OFFSET
1,2
COMMENTS
Sequence A066853 gives the number of possible residues of the Fibonacci numbers mod n. For the n in this sequence, it appears that A066853(n) < A066853(m) for all m > n. For these n, the set of residues consists of Fibonacci numbers < n and some of their negatives (see example).
Interestingly, for n > 5, this sequence alternates the even-index Fibonacci and odd-indexed Lucas numbers, A001906 and A002878. See A109794 for the sequence without 2 and 5.
The number of residues is 1, 2, 3, 4, 5, 6, 7, 9, 10, 12, 13, 15, 16, ..., which is A032766 with 2 and 5 included.
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,3,0,-1).
FORMULA
From Colin Barker, Oct 29 2013: (Start)
a(n) = 3*a(n-2) - a(n-4) for n > 9.
G.f.: x*(x^8 + x^7 - x^6 - 2*x^5 - 3*x^4 - 2*x^3 + 2*x + 1) / ((x^2-x-1)*(x^2+x-1)). (End)
EXAMPLE
For n=55, the residues are {0, 1, 2, 3, 5, 8, 13, 21, 34, 47, 52, 54} which can also be written as {0, 1, 2, 3, 5, 8, 13, 21, -21, -8, -3, -1}.
MATHEMATICA
Union[{2, 5}, Fibonacci[Range[2, 20, 2]], LucasL[Range[1, 20, 2]]]
PROG
(PARI) Vec(x*(x^8+x^7-x^6-2*x^5-3*x^4-2*x^3+2*x+1)/((x^2-x-1)*(x^2+x-1)) + O(x^100)) \\ Colin Barker, Oct 29 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
T. D. Noe, May 10 2011
STATUS
approved