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.

A036119 a(n) = 3^n mod 17.

Original entry on oeis.org

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

Views

Author

Keywords

References

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

Crossrefs

Cf. A000244 (3^n).

Programs

  • GAP
    List([0..55],n->PowerMod(3,n,17)); # Muniru A Asiru, Oct 17 2018
  • Magma
    [Modexp(3, n, 17): n in [0..100]]; // Bruno Berselli, Mar 23 2016
    
  • Maple
    i := pi(17) ; [ seq(primroot(ithprime(i))^j mod ithprime(i),j=0..100) ];
  • Mathematica
    PowerMod[3, Range[0, 100], 17] (* Vincenzo Librandi, Mar 26 2016 *)
  • PARI
    a(n)=lift(Mod(3,17)^n) \\ Charles R Greathouse IV, Mar 22 2016
    
  • Python
    for n in range(0, 100): print(int(pow(3, n, 17)), end=' ') # Stefano Spezia, Oct 17 2018
    
  • Sage
    [power_mod(3,n,17)for n in range(0, 68)] # Zerinvary Lajos, Nov 25 2009
    

Formula

G.f.: (1 + 2*x + 6*x^2 + x^3 + 3*x^4 - 8*x^5 + 10*x^6 - 4*x^7 + 6*x^8)/ ((1-x) * (1+x^8)). - R. J. Mathar, Apr 13 2010
a(n) = a(n-1) - a(n-8) + a(n-9). - R. J. Mathar, Apr 13 2010
a(n) = a(n-16). - Vincenzo Librandi, Mar 26 2016
a(n) = 17 - a(n+8) for all n in Z. - Michael Somos, Oct 17 2018