|
|
|
|
1, 3, 5, 4, 5, 3, 1, 1, 3, 5, 4, 5, 3, 1, 1, 3, 5, 4, 5, 3, 1, 1, 3, 5, 4, 5, 3, 1, 1, 3, 5, 4, 5, 3, 1, 1, 3, 5, 4, 5, 3, 1, 1, 3, 5, 4, 5, 3, 1, 1, 3, 5, 4, 5, 3, 1, 1, 3, 5, 4, 5, 3, 1, 1, 3, 5, 4, 5, 3, 1, 1, 3, 5, 4, 5, 3, 1, 1, 3, 5, 4, 5, 3, 1, 1, 3, 5, 4, 5, 3, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Periodic with period length 7.
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (1 + 3*x + 5*x^2 + 4*x^3 + 5*x^4 + 3*x^5 + x^6) / ((1 - x)*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)). - Colin Barker, May 10 2016
a(n) = (3*m^6 - 54*m^5 + 365*m^4 - 1140*m^3 + 1582*m^2 - 636*m + 60)/60, where m = n mod 7. - Luce ETIENNE, Oct 18 2018
|
|
MAPLE
|
f:=proc(n) option remember; if n = 0 then 1 elif n=1 then 3 else f(n-2)+(4*n-2)*f(n-1); fi; end;
[seq(f(n) mod 7, n=0..120)];
|
|
MATHEMATICA
|
PadRight[{}, 120, {1, 3, 5, 4, 5, 3, 1}] (* Harvey P. Dale, Jul 17 2020 *)
|
|
PROG
|
(PARI) Vec((1+3*x+5*x^2+4*x^3+5*x^4+3*x^5+x^6)/((1-x)*(1+x+x^2+x^3+x^4+x^5+x^6)) + O(x^50)) \\ Colin Barker, May 10 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|