|
|
A053879
|
|
a(n) = n^2 mod 7.
|
|
10
|
|
|
0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1, 0, 1, 4, 2, 2, 4, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
Periodic with period 7.
G.f.: -x*(1+x)*(x^4 + 3*x^3 - x^2 + 3*x + 1) / ( (x-1)*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6) ). - R. J. Mathar, Feb 24 2011
|
|
MATHEMATICA
|
LinearRecurrence[{0, 0, 0, 0, 0, 0, 1}, {0, 1, 4, 2, 2, 4, 1}, 105] (* Ray Chandler, Aug 26 2015 *)
PowerMod[Range[0, 120], 2, 7] (* or *) PadRight[{}, 120, {0, 1, 4, 2, 2, 4, 1}] (* Harvey P. Dale, Sep 01 2017 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
Stuart M. Ellerstein (ellerstein(AT)aol.com), Apr 01 2000
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|