proposed
approved
Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
proposed
approved
editing
proposed
a(n) = 3^n mod n^2.
(PARI) a(n) = lift(Mod(3, n^2)^n); \\ Michel Marcus, May 05 2021
proposed
editing
editing
proposed
for n in range(1, 100): print (str(3**n % n**2)+, end=', ', )
approved
editing
editing
approved
Table[PowerMod[3, n, n^2], {n, 100}] (* Harvey P. Dale, Aug 27 2019 *)
approved
editing
editing
approved
Alois P. Heinz, <a href="/A233471/b233471.txt">Table of n, a(n) for n = 1..10000</a>
a:= n-> 3&^n mod n^2:
seq(a(n), n=1..60); # Alois P. Heinz, Dec 22 2013
approved
editing
proposed
approved