Recent content by paut
-
P
Undergrad Reducing the operation by using the modulo
Ok, I know. This is the Fibonacci series (2,3,5,8,13,21,34 ...). How can I calculate: fib(n)^2 mod 1000000007, even for very large numbers? Is it correct? https://ideone.com/cuGkK- paut
- Post #15
- Forum: Linear and Abstract Algebra
-
P
Undergrad Reducing the operation by using the modulo
According to my formula for n=7, the number of combinations is 39, but I can’t find so many. If I don't find 39 combinations then the error is in formula. Combinations which I could find (33): 0000000 0000001 0000010 0000100 0001000 0010000 0100000 1000000 1000001 1000010 1000100 1001000...- paut
- Post #13
- Forum: Linear and Abstract Algebra
-
P
Undergrad Reducing the operation by using the modulo
I send the source code for online judge, that evaluates the results, but the score for my program is "Wrong answer".- paut
- Post #11
- Forum: Linear and Abstract Algebra
-
P
Undergrad Reducing the operation by using the modulo
Here are the calculations that should be correct: http://img695.imageshack.us/img695/3950/calcw.png My program returns the same result (the first based on a string and second without them). I also have exactly the same results as you. The problem is probably in the wrong set formula :/ I see...- paut
- Post #9
- Forum: Linear and Abstract Algebra
-
P
Undergrad Reducing the operation by using the modulo
From the beginning I should explain what I want to achieve. My work for the sequences of length 'n' is finding a number of variations elements of two-piece set, in this way that one of this two elements (doesn't matter which) will never occur next to another. If set is composed just of '0' and...- paut
- Post #7
- Forum: Linear and Abstract Algebra
-
P
Undergrad Reducing the operation by using the modulo
"mod_pow" is a function (using fast modular exponentiation) which returns the result of exponentiation modulo 1000000007 - mod_pow (the first parameter, second parameter, modulo). The first parameter is the base, and the second parameter is the exponent. For: y <- n + mod_pow (2, n-2...- paut
- Post #4
- Forum: Linear and Abstract Algebra
-
P
Undergrad Reducing the operation by using the modulo
Hi, I wonder that is there any way to disassemble this operation ((n+2^(n-2))^2 mod 1000000007) without counting 2^n-2. Please, help me.- paut
- Thread
- Replies: 15
- Forum: Linear and Abstract Algebra