OFFSET
1,3
FORMULA
EXAMPLE
For n = 1, a(n) = prime(1)^1 mod 1^1 = 2^1 mod 1 = 2 mod 1 = 0.
For n = 2, a(n) = prime(2)^2 mod 2^2 = 3^2 mod 4 = 9 mod 4 = 1.
For n = 3, a(n) = prime(3)^3 mod 3^3 = 5^3 mod 27 = 125 mod 27 = 17.
MATHEMATICA
Table[Mod[Prime[n]^n, n^n], {n, 18}] (* Michael De Vlieger, Sep 15 2015 *)
PROG
(PARI) a(n) = (prime(n)^n) % (n^n);
vector(18, n, a(n))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Altug Alkan, Sep 15 2015
STATUS
approved