Pisano period: Difference between revisions
Content added Content deleted
m (added whitespace.) |
|||
Line 1: | Line 1: | ||
{{draft task}} |
{{draft task}} |
||
[[Category:Mathematics]] |
|||
The [[wp:Fibonacci_Number|Fibonacci sequence]] taken modulo 2 is a periodic sequence of period 3 : 0, 1, 1, 0, 1, 1, ... |
The [[wp:Fibonacci_Number|Fibonacci sequence]] taken modulo 2 is a periodic sequence of period 3 : 0, 1, 1, 0, 1, 1, ... |
||
Line 6: | Line 8: | ||
Prime numbers are straightforward; the Pisano period of a prime number '''p''' is simply: '''pisano(p)'''. The Pisano period of a composite number '''c''' may be found in different ways. It may be calculated directly: '''pisano(c)''', which works, but may be time consuming to find, especially for larger integers, or, it may be calculated by finding the [[wp:Least common multiple|least common multiple]] of the Pisano periods of each composite component. |
Prime numbers are straightforward; the Pisano period of a prime number '''p''' is simply: '''pisano(p)'''. The Pisano period of a composite number '''c''' may be found in different ways. It may be calculated directly: '''pisano(c)''', which works, but may be time consuming to find, especially for larger integers, or, it may be calculated by finding the [[wp:Least common multiple|least common multiple]] of the Pisano periods of each composite component. |
||
⚫ | |||
;E.G.: |
|||
⚫ | |||
'''pisano(m × n)''' is equivalent to '''lcm(pisano(m), pisano(n))''' where '''m''' and '''n''' are '''[[wp:Coprime|coprime]]''' |
'''pisano(m × n)''' is equivalent to '''lcm(pisano(m), pisano(n))''' where '''m''' and '''n''' are '''[[wp:Coprime|coprime]]''' |
||
Line 17: | Line 21: | ||
The equation is conjectured, no exceptions have been seen. |
The equation is conjectured, no exceptions have been seen. |
||
If a positive integer i is split into its prime factors then the second and first equations above can be applied to generate the pisano period. |
If a positive integer '''i''' is split into its prime factors then the second and first equations above can be applied to generate the pisano period. |
||
;Task |
;Task |
||
Line 31: | Line 36: | ||
Print pisano(m) for every integer from 1 to 180. |
Print pisano(m) for every integer from 1 to 180. |
||
;Related tasks |
;Related tasks |
||
Line 36: | Line 42: | ||
* [[Prime decomposition]] |
* [[Prime decomposition]] |
||
* [[Least common multiple]] |
* [[Least common multiple]] |
||
<br><br> |
|||
=={{header|Factor}}== |
=={{header|Factor}}== |