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.

A297966 a(n) = 3^n mod prime(n).

Original entry on oeis.org

1, 0, 2, 4, 1, 1, 11, 6, 18, 5, 13, 10, 38, 36, 42, 15, 19, 34, 5, 32, 46, 51, 49, 39, 94, 30, 73, 53, 9, 91, 114, 100, 79, 121, 38, 127, 122, 113, 126, 138, 82, 114, 118, 112, 119, 10, 108, 30, 188, 20, 188, 30, 174, 169, 5, 52, 15, 241, 202, 222, 50, 267
Offset: 1

Views

Author

Vincenzo Librandi, Jan 11 2018

Keywords

Crossrefs

Programs

  • GAP
    P:=Filtered([1..1500],IsPrime);;List([1..65],n->PowerModInt(3,n,P[n])); # Muniru A Asiru, Mar 12 2018
  • Magma
    [Modexp(3, n, NthPrime(n)): n in [1..80]];
    
  • Maple
    seq(3 &^ n mod ithprime(n), n=1..65); # Muniru A Asiru, Mar 12 2018
  • Mathematica
    Array[PowerMod[3, #, Prime@#]&, 80]
  • PARI
    a(n) = lift(Mod(3, prime(n))^n); \\ Michel Marcus, Jan 11 2018
    

Formula

a(n) = A000244(n) mod A000040(n).