OFFSET
0,3
COMMENTS
Essentially a duplicate of A021559. - N. J. A. Sloane, Oct 30 2009
Equivalently: n^(6*m + 3) mod 9. - G. C. Greubel, Jun 04 2016
Decimal expansion of 2/111. - Elmo R. Oliveira, Feb 19 2024
LINKS
FORMULA
G.f.: -x*(1+8*x) / ( (x-1)*(1+x+x^2) ). - R. J. Mathar, Aug 24 2016
MATHEMATICA
Table[Mod[n^3, 9], {n, 0, 200}] (* Vladimir Joseph Stephan Orlovsky, Apr 23 2011 *)
PROG
(Sage) [power_mod(n, 3, 9 ) for n in range(0, 105)]
(PARI) a(n)=n^3%9 \\ Charles R Greathouse IV, Apr 06 2016
(PARI) a(n)=[0, 1, 8][n%3+1]; \\ Joerg Arndt, Feb 20 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Zerinvary Lajos, Oct 29 2009
STATUS
approved