OFFSET
0,6
MATHEMATICA
f[0]=1; f[n_]:=Module[{m=n^n}, While[Mod[m, 3]==0, m=m/3]; Mod[m, 3]]; Table[f[i], {i, 0, 84}]
PROG
(PARI) a(n)=lift(Mod(n/3^valuation(n, 3), 3)^n) \\ Charles R Greathouse IV, Jan 23 2012
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
José María Grau Ribas, Jan 18 2012
STATUS
approved