cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A261694 a(n) = Fibonacci(n) mod 21.

Original entry on oeis.org

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

Views

Author

G. C. Greubel, Nov 18 2015

Keywords

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.

Crossrefs

Programs

  • Magma
    [Fibonacci(n) mod 21: n in [0..120]]; // Vincenzo Librandi, Nov 19 2015
    
  • 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 *)
  • 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

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).