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.

A062116 a(n) = 2^n mod 17.

Original entry on oeis.org

1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13, 9, 1, 2, 4, 8, 16, 15, 13
Offset: 0

Views

Author

Olivier Gérard, Jun 06 2001

Keywords

Comments

Period 8.

Examples

			a(5) = 32 mod 17 = 15.
		

References

  • I. M. Vinogradov, Elements of Number Theory, pp. 220 ff.

Crossrefs

Programs

  • GAP
    a:=List([0..70],n->PowerMod(2,n,17));; Print(a); # Muniru A Asiru, Jan 29 2019
  • Magma
    [2^n mod 17: n in [0..100]]; // G. C. Greubel, Oct 16 2018
    
  • Mathematica
    Mod[#,17]&/@(2^Range[0,100])  (* Harvey P. Dale, Mar 06 2011 *)
  • PARI
    a(n) = { lift(Mod(2,17)^n) } \\ Harry J. Smith, Aug 01 2009
    
  • Sage
    [power_mod(2,n,17) for n in range(0,87)] # Zerinvary Lajos, Nov 03 2009
    

Formula

From R. J. Mathar, Apr 13 2010: (Start)
a(n) = a(n-1) - a(n-4) + a(n-5).
G.f.: (1 + x + 2*x^2 + 4*x^3 + 9*x^4)/((1-x)*(1+x^4)). (End)
a(n) = 17 - a(n+4) = a(n+8) for all n in Z. - Michael Somos, Oct 17 2018