login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A261694
a(n) = Fibonacci(n) mod 21.
1
0, 1, 1, 2, 3, 5, 8, 13, 0, 13, 13, 5, 18, 2, 20, 1, 0, 1, 1, 2, 3, 5, 8, 13, 0, 13, 13, 5, 18, 2, 20, 1, 0, 1, 1, 2, 3, 5, 8, 13, 0, 13, 13, 5, 18, 2, 20, 1, 0, 1, 1, 2, 3, 5, 8, 13, 0, 13, 13, 5, 18, 2, 20, 1, 0, 1, 1, 2, 3, 5, 8, 13, 0, 13, 13, 5, 18, 2, 20, 1, 0, 1, 1, 2, 3, 5, 8, 13, 0, 13
OFFSET
0,4
COMMENTS
Sequence is periodic with Pisano period 16; Pisano number 21 in the sequence A001175. The only other sequence with Pisano period 16 is that of A105870 which is the Fibonacci sequence mod 7. This is Pisano number 7.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000 [a(391) = 13 corrected by Georg Fischer, May 24 2019]
FORMULA
G.f.: x*(1 + x + 2*x^2 + 3*x^3 + 5*x^4 + 8*x^5 + 13*x^6 + 13*x^8 + 13*x^9 + 5*x^10 + 18*x^11 + 2*x^12 + 20*x^13 + x^14)/(1-x^16).
MATHEMATICA
Table[Mod[Fibonacci[n], 21], {n, 0, 100}]
PadRight[{}, 120, {0, 1, 1, 2, 3, 5, 8, 13, 0, 13, 13, 5, 18, 2, 20, 1}] (* Harvey P. Dale, May 16 2020 *)
PROG
(Magma) [Fibonacci(n) mod 21: n in [0..120]]; // Vincenzo Librandi, Nov 19 2015
(PARI) a(n) = fibonacci(n)%21; \\ Altug Alkan, Nov 19 2015
(Python)
A261694_list, a, b, = [], 0, 1
for _ in range(10**3):
A261694_list.append(a)
a, b = b, (a+b) % 21 # Chai Wah Wu, Nov 26 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
G. C. Greubel, Nov 18 2015
STATUS
approved