OFFSET
2,2
COMMENTS
If pi(n) is the n-th Pisano number (A001175) then a(n) is usually about pi(n)/2 - and in any case a(n) > pi(n)/4.
LINKS
T. D. Noe, Table of n, a(n) for n=2..10000
R. C. Johnson, Fibonacci Numbers and Resources.
M. Merca, Inequalities and Identities Involving Sums of Integer Functions, J. Int. Seq. 14 (2011) # 11.9.1.
FORMULA
n*a(n) = sum{k=1..A001175(n)} fibonacci(k) mod n. [Mircea Merca, Jan 03 2011]
EXAMPLE
a(8)=4 because one cycle of the Fibonacci numbers modulo 8 is 0, 1, 1, 2, 3, 5; 0, 5, 5; 2, 7; 1; - including 4 'mod 8' operations, each marked with a semi-colon.
MATHEMATICA
(* pp = Pisano period = A001175 *) pp[1] = 1;
pp[n_] := For[k = 1, True, k++, If[Mod[Fibonacci[k], n] == 0 && Mod[Fibonacci[k + 1], n] == 1, Return[k]]];
a[n_] := Sum[Mod[Fibonacci[k], n], {k, 1, pp[n]}]/n;
Table[a[n], {n, 2, 77}] (* Jean-François Alcover, Sep 05 2017 *)
CROSSREFS
KEYWORD
easy,nice,nonn
AUTHOR
R C Johnson (bob.johnson(AT)dur.ac.uk), Nov 19 2003
EXTENSIONS
More terms from T. D. Noe
Edited by Ray Chandler, Oct 26 2006
STATUS
approved