|
|
A070347
|
|
a(n) = 2^n mod 21.
|
|
2
|
|
|
1, 2, 4, 8, 16, 11, 1, 2, 4, 8, 16, 11, 1, 2, 4, 8, 16, 11, 1, 2, 4, 8, 16, 11, 1, 2, 4, 8, 16, 11, 1, 2, 4, 8, 16, 11, 1, 2, 4, 8, 16, 11, 1, 2, 4, 8, 16, 11, 1, 2, 4, 8, 16, 11, 1, 2, 4, 8, 16, 11, 1, 2, 4, 8, 16, 11, 1, 2, 4, 8, 16, 11, 1, 2, 4, 8, 16, 11, 1, 2, 4, 8, 16, 11, 1, 2, 4, 8, 16, 11
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5).
G.f.: (1 + x + 3*x^2 + 5*x^3 + 11*x^4)/ ((1-x) * (1+x+x^2) * (1-x+x^2)). (End)
|
|
MATHEMATICA
|
LinearRecurrence[{1, -1, 1, -1, 1}, {1, 2, 4, 8, 16}, 120] (* or *) PadRight[{}, 120, {1, 2, 4, 8, 16, 11}] (* Harvey P. Dale, Mar 19 2016 *)
|
|
PROG
|
(Sage) [power_mod(2, n, 21)for n in range(0, 90)] # Zerinvary Lajos, Nov 03 2009
(GAP) List([0..83], n->PowerMod(2, n, 21)); # Muniru A Asiru, Jan 31 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|