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.

A168399 a(n) = 3^n mod 13.

Original entry on oeis.org

1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9, 1, 3, 9
Offset: 0

Views

Author

Zerinvary Lajos, Nov 25 2009

Keywords

Comments

Equivalently: 3^(n+3*m) mod 13. - G. C. Greubel, Jul 20 2016

Programs

  • Magma
    [Modexp(3, n, 13): n in [0..110]]; // Vincenzo Librandi, Jul 21 2016
  • Mathematica
    Table[Mod[3^n,13], {n,0,50}] (* G. C. Greubel, Jul 20 2016 *)
  • PARI
    a(n)=lift(Mod(3,13)^n) \\ Charles R Greathouse IV, Mar 22 2016
    
  • Sage
    [power_mod(3, n, 13)for n in range(0, 93)] #
    

Formula

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