OFFSET
1,5
LINKS
Harry J. Smith and Seiichi Manyama, Table of n, a(n) for n = 1..10000 (first 1000 terms from Harry J. Smith)
EXAMPLE
a(7) = 3 as 3^7 = 2187 = 7*312 + 3.
MAPLE
seq(irem(3^n, n), n=1..75); # Zerinvary Lajos, Apr 20 2008
MATHEMATICA
Table[PowerMod[3, n, n], {n, 75}]
PROG
(PARI) a(n) = { lift(Mod(3, n)^n) } \\ Harry J. Smith, Mar 09 2010
(Python)
def A066601(n): return pow(3, n, n) # Chai Wah Wu, Aug 24 2023
CROSSREFS
KEYWORD
base,easy,nonn,changed
AUTHOR
Amarnath Murthy, Dec 22 2001
EXTENSIONS
More terms from Robert G. Wilson v, Dec 27 2001
STATUS
approved