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.

A070371 a(n) = 5^n mod 17.

Original entry on oeis.org

1, 5, 8, 6, 13, 14, 2, 10, 16, 12, 9, 11, 4, 3, 15, 7, 1, 5, 8, 6, 13, 14, 2, 10, 16, 12, 9, 11, 4, 3, 15, 7, 1, 5, 8, 6, 13, 14, 2, 10, 16, 12, 9, 11, 4, 3, 15, 7, 1, 5, 8, 6, 13, 14, 2, 10, 16, 12, 9, 11, 4, 3, 15, 7, 1, 5, 8, 6, 13, 14, 2, 10, 16, 12, 9, 11, 4, 3, 15, 7, 1, 5, 8, 6, 13, 14
Offset: 0

Views

Author

N. J. A. Sloane, May 12 2002

Keywords

Comments

Periodic with period 16 (5 is a primitive root of 17). [Joerg Arndt, Mar 06 2016]

Crossrefs

Cf. A000351.

Programs

  • Magma
    &cat[[1,5,8,6,13,14,2,10,16,12,9,11,4,3,15,7]^^5]; // Vincenzo Librandi, Mar 06 2016
  • Mathematica
    PowerMod[5,Range[0,90],17] (* or *) LinearRecurrence[ {1,0,0,0,0,0,0,-1,1},{1,5,8,6,13,14,2,10,16},90] (* Harvey P. Dale, Jun 26 2013 *)
    Table[Mod[5^n, 17], {n, 0, 100}] (* G. C. Greubel, Mar 05 2016 *)
  • PARI
    a(n) = lift(Mod(5, 17)^n); \\ Michel Marcus, Mar 05 2016
    
  • PARI
    x='x+O('x^100); Vec((-1-4*x-3*x^2+2*x^3-7*x^4-x^5+12*x^6-8*x^7-7*x^8)/((x-1)*(1+x^8))) \\ Altug Alkan, Mar 05 2016
    
  • Sage
    [power_mod(5,n,17) for n in range(0,86)] # Zerinvary Lajos, Nov 26 2009
    

Formula

From R. J. Mathar, Apr 20 2010: (Start)
a(n) = a(n-1) - a(n-8) + a(n-9).
G.f.: (-1-4*x-3*x^2+2*x^3-7*x^4-x^5+12*x^6-8*x^7-7*x^8) / ((x-1)*(1+x^8)). (End)
a(n) = a(n-16). - G. C. Greubel, Mar 05 2016