OFFSET
1,3
COMMENTS
prime(k+1)^k mod prime(k) = k: 1, 3, 4, 76, 7743, ... .
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
EXAMPLE
a(5) = prime(5+1)^5 mod prime(5) = 13^5 mod 11 = 10.
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 *)
PROG
(Magma) [(NthPrime(n+1)^n mod NthPrime(n)): n in [1..100]]; // Juri-Stepan Gerasimov, Apr 07 2014
(PARI) a(n)=my(p=prime(n)); lift(Mod(nextprime(p+1), p)^n) \\ Charles R Greathouse IV, Apr 08 2014
CROSSREFS
KEYWORD
nonn,less
AUTHOR
Irina Gerasimova, Apr 07 2014
STATUS
approved