login
A070440
a(n) = n^2 mod 18.
2
0, 1, 4, 9, 16, 7, 0, 13, 10, 9, 10, 13, 0, 7, 16, 9, 4, 1, 0, 1, 4, 9, 16, 7, 0, 13, 10, 9, 10, 13, 0, 7, 16, 9, 4, 1, 0, 1, 4, 9, 16, 7, 0, 13, 10, 9, 10, 13, 0, 7, 16, 9, 4, 1, 0, 1, 4, 9, 16, 7, 0, 13, 10, 9, 10, 13, 0, 7, 16, 9, 4, 1, 0, 1, 4, 9, 16, 7, 0, 13, 10, 9, 10, 13, 0, 7, 16, 9
OFFSET
0,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
FORMULA
a(n) = a(n-18). - R. J. Mathar, Jul 27 2015
G.f.: -x*(1 +4*x +9*x^2 +16*x^3 +7*x^4 +13*x^6 +10*x^7 +9*x^8 +10*x^9 +13*x^10 +7*x^12 +16*x^13 +9*x^14 +4*x^15 +x^16) / ( (x-1)*(1+x+x^2)*(1+x^3+x^6)*(1+x)*(1-x+x^2)*(1-x^3+x^6) ). - R. J. Mathar, Jul 27 2015
MATHEMATICA
Table[Mod[n^2, 18], {n, 0, 200}] (* Vladimir Joseph Stephan Orlovsky, Apr 23 2011 *)
PROG
(PARI) a(n)=n^2%18 \\ Charles R Greathouse IV, Apr 06 2016
CROSSREFS
Sequence in context: A086957 A096879 A070441 * A368103 A054580 A165488
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 12 2002
STATUS
approved