OFFSET
1,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000 (first 1000 terms from Harry J. Smith)
EXAMPLE
a(7) = 30 as 2^7 = 128 = (7^2)*2 + 30.
MAPLE
a:= n-> 2&^n mod (n^2):
seq(a(n), n=1..100); # Alois P. Heinz, Jul 04 2017
MATHEMATICA
Table[PowerMod[2, n, n^2], {n, 60}] (* Harvey P. Dale, Dec 08 2015 *)
PROG
(PARI) a(n) = { lift(Mod(2, n^2)^n) } \\ Harry J. Smith, Mar 10 2010
CROSSREFS
KEYWORD
easy,nonn,changed
AUTHOR
Amarnath Murthy, Dec 22 2001
EXTENSIONS
More terms from Floor van Lamoen and Robert G. Wilson v, Dec 23 2001
STATUS
approved