|
|
A070431
|
|
a(n) = n^2 mod 6.
|
|
20
|
|
|
0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4, 1, 0, 1, 4, 3, 4
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
a(m*n) = a(m)*a(n) mod 6; a(3*n+k) = a(3*n-k) for k <= 3*n. - Reinhard Zumkeller, Apr 24 2009
Equivalently: n^(2*m + 4) mod 6; n^(2*m + 2) mod 6. - G. C. Greubel, Apr 01 2016
|
|
LINKS
|
|
|
FORMULA
|
G.f.: -x*(1+4*x+3*x^2+4*x^3+x^4)/((x-1)*(1+x)*(1+x+x^2)*(x^2-x+1)). - R. J. Mathar, Jul 23 2009
a(6*m) = 0.
a(n) = (1/6)*(13 + 3*(-1)^n - 12*cos(n*Pi/3) - 4*cos(2*n*Pi/3)).
G.f.: (x +4*x^2 +3*x^3 + 4*x^4 +x^5)/(1 - x^6). (End)
|
|
MAPLE
|
|
|
MATHEMATICA
|
LinearRecurrence[{0, 0, 0, 0, 0, 1}, {0, 1, 4, 3, 4, 1}, 101] (* Ray Chandler, Aug 26 2015 *)
PowerMod[Range[0, 120], 2, 6] (* or *) PadRight[{}, 120, {0, 1, 4, 3, 4, 1}] (* Harvey P. Dale, Aug 11 2019 *)
|
|
PROG
|
(Sage) [power_mod(n, 2, 6) for n in range(0, 101)] # Zerinvary Lajos, Oct 30 2009
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|