login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A060305 Pisano periods for primes: period of Fibonacci numbers mod prime(n). 14
3, 8, 20, 16, 10, 28, 36, 18, 48, 14, 30, 76, 40, 88, 32, 108, 58, 60, 136, 70, 148, 78, 168, 44, 196, 50, 208, 72, 108, 76, 256, 130, 276, 46, 148, 50, 316, 328, 336, 348, 178, 90, 190, 388, 396, 22, 42, 448, 456, 114, 52, 238, 240, 250, 516, 176, 268, 270, 556 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Assuming Wall's conjecture (which is still open) allows one to calculate A001175(m) when m is a prime power since for any k >= 1: A001175(prime(n)^k) = a(n)*prime(n)^(k-1). For example: A001175(2^k) = 3*2^(k-1) = A007283(k-1).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
B. Avila and T. Khovanova, Free Fibonacci Sequences, arXiv preprint arXiv:1403.4614 [math.NT], 2014 and J. Int. Seq. 17 (2014), # 14.8.5.
D. D. Wall, Fibonacci series modulo m, Amer. Math. Monthly, 67 (1960), 525-532.
Wikipedia, Pisano period.
FORMULA
a(n) = A001175(prime(n)). - Jonathan Sondow, Dec 09 2017
a(n) = (3 - L(p))/2 * (p - L(p)) / A296240(n) for n >= 4, where p = prime(n) and L(p) = Legendre(p|5); so a(n) <= p-1 if p == +- 1 mod 5, and a(n) <= 2*p+2 if p == +- 2 mod 5. See Wall's Theorems 6 and 7. - Jonathan Sondow, Dec 10 2017
MAPLE
a:= proc(n) option remember; local F, k, p;
F:=[1, 1]; p:=ithprime(n);
for k while F<>[0, 1] do
F:=[F[2], irem(F[1]+F[2], p)]
od: k
end:
seq(a(n), n=1..70); # Alois P. Heinz, Oct 16 2015
MATHEMATICA
Table[p=Prime[n]; a={1, 0}; a0=a; k=0; While[k++; s=Mod[Plus@@a, p]; a=RotateLeft[a]; a[[2]]=s; a!=a0]; k, {n, 100}] (* T. D. Noe, Jun 12 2006 *)
PROG
(PARI) for(n=1, 100, s=1; while(sum(i=n, n+s, abs(fibonacci(i)%prime(n)-fibonacci(i+s)%prime(n)))+sum(i=n+1, n+1+s, abs(fibonacci(i)%prime(n)-fibonacci(i+s)%prime(n)))>0, s++); print1(s, ", "))
(Python)
from itertools import count
from sympy import prime
def A060305(n):
x, p = (1, 1), prime(n)
for k in count(1):
if x == (0, 1):
return k
x = (x[1], (x[0]+x[1]) % p) # Chai Wah Wu, May 31 2022
CROSSREFS
Sequence in context: A151347 A047093 A304256 * A009141 A090069 A272528
KEYWORD
nonn
AUTHOR
Louis Mello (mellols(AT)aol.com), Mar 26 2001
EXTENSIONS
Corrected by Benoit Cloitre, Jun 04 2002
Name clarified by Jonathan Sondow, Dec 09 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 28 06:12 EDT 2024. Contains 372020 sequences. (Running on oeis4.)