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.

A070341 a(n) = 3^n mod 11: Repeat (1, 3, 9, 5, 4), period 5.

Original entry on oeis.org

1, 3, 9, 5, 4, 1, 3, 9, 5, 4, 1, 3, 9, 5, 4, 1, 3, 9, 5, 4, 1, 3, 9, 5, 4, 1, 3, 9, 5, 4, 1, 3, 9, 5, 4, 1, 3, 9, 5, 4, 1, 3, 9, 5, 4, 1, 3, 9, 5, 4, 1, 3, 9, 5, 4, 1, 3, 9, 5, 4, 1, 3, 9, 5, 4, 1, 3, 9, 5, 4, 1, 3, 9, 5, 4, 1, 3, 9, 5, 4, 1, 3, 9, 5, 4, 1, 3, 9, 5, 4, 1, 3, 9
Offset: 0

Views

Author

N. J. A. Sloane, May 12 2002

Keywords

Comments

Simple continued fraction expansion of 13/24 + sqrt(8761)/120 = 1.3216684472... - R. J. Mathar, Mar 08 2012

Programs

  • Mathematica
    PowerMod[3,Range[0,100],11] (* or *) PadRight[{},100,{1,3,9,5,4}] (* Harvey P. Dale, Feb 05 2012 *)
  • PARI
    a(n)=lift(Mod(3,11)^n)
    
  • PARI
    a(n)=[1, 3, 9, 5, 4][n%5+1]  \\ M. F. Hasler, Mar 04 2011
  • Sage
    [power_mod(3, n, 11)for n in range(0, 93)] # Zerinvary Lajos, Nov 24 2009
    

Formula

From R. J. Mathar, Apr 13 2010: (Start)
a(n) = a(n-5).
G.f.: (1+3*x+9*x^2+5*x^3+4*x^4)/ ((1-x) * (1+x+x^2+x^3+x^4)). (End)