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.

A240546 a(n) = prime(n+1)^n mod prime(n).

Original entry on oeis.org

1, 1, 3, 4, 10, 1, 9, 5, 16, 9, 26, 10, 33, 1, 2, 49, 33, 3, 35, 48, 3, 32, 62, 64, 4, 20, 8, 62, 93, 83, 64, 41, 68, 79, 138, 125, 88, 56, 4, 169, 72, 36, 40, 144, 73, 140, 63, 120, 24, 218, 67, 48, 58, 194, 126, 54, 74, 223, 74, 59, 176, 161, 280, 208, 215, 236, 82, 141, 139, 344, 7
Offset: 1

Views

Author

Irina Gerasimova, Apr 07 2014

Keywords

Comments

prime(k+1)^k mod prime(k) = k: 1, 3, 4, 76, 7743, ... .

Examples

			a(5) = prime(5+1)^5 mod prime(5) = 13^5 mod 11 = 10.
		

Crossrefs

Cf. A038702.

Programs

  • Magma
    [(NthPrime(n+1)^n mod NthPrime(n)): n in [1..100]]; // Juri-Stepan Gerasimov, Apr 07 2014
    
  • Maple
    a:= n-> ithprime(n+1) &^n mod ithprime(n):
    seq(a(n), n=1..100);  # Alois P. Heinz, Apr 30 2014
  • Mathematica
    Table[Mod[Prime[n + 1]^n, Prime[n]], {n, 80}] (* Alonso del Arte, Apr 11 2014 *)
    Table[PowerMod[Prime[n+1],n,Prime[n]],{n,80}] (* Harvey P. Dale, Jun 11 2019 *)
  • PARI
    a(n)=my(p=prime(n)); lift(Mod(nextprime(p+1),p)^n) \\ Charles R Greathouse IV, Apr 08 2014