|
|
A117761
|
|
Expansion of x*(1 + x^2 + x^4)/(1 - x - x^3 - x^5 - x^7).
|
|
1
|
|
|
0, 1, 1, 2, 3, 5, 8, 12, 20, 32, 51, 82, 131, 210, 336, 538, 862, 1380, 2210, 3539, 5667, 9075, 14532, 23271, 37265, 59674, 95559, 153023, 245043, 392399, 628367, 1006234, 1611330, 2580299, 4131955, 6616695, 10595627, 16967279, 27170507, 43509419
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
Previous name: First entry of the vector (M^n)w, where M is the 7x7 matrix [[0,1,0,0,0,0,0], [0,0,1,0,0,0,0], [0,0,0,1,0,0,0], [0,0,0,0,1,0,0], [0,0,0,0,0,1,0], [0,0,0,0,0,0,1], [1,0,1,0,1,0,1]] and w is the column vector [0,1,1,2,3,5,8].
|
|
LINKS
|
|
|
FORMULA
|
a(n) = a(n-1) + a(n-3) + a(n-5) + a(n-7).
G.f.: (x + x^3 + x^5)/(1 - x - x^3 - x^5 - x^7). - Joel B. Lewis, Nov 14 2012
|
|
MAPLE
|
with(linalg): M:=matrix(7, 7, [0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1]):
w[0]:=matrix(7, 1, [0, 1, 1, 2, 3, 5, 8]): for n from 1 to 40 do
w[n]:=multiply(M, w[n-1]) od: seq(w[n][1, 1], n=0..40);
|
|
MATHEMATICA
|
M = {{0, 1, 0, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 0, 0, 1}, {1, 0, 1, 0, 1, 0, 1}};
w[1] = {0, 1, 1, 2, 3, 5, 8}; w[n_]:= w[n]= M.w[n-1];
LinearRecurrence[{1, 0, 1, 0, 1, 0, 1}, {0, 1, 1, 2, 3, 5, 8}, 50] (* Harvey P. Dale, Oct 06 2017 *)
|
|
PROG
|
(Magma) R<x>:=PowerSeriesRing(Integers(), 50); [0] cat Coefficients(R!( x*(1+x^2+x^4)/(1-x-x^3-x^5-x^7) )); // G. C. Greubel, Jul 21 2023
(SageMath)
@CachedFunction
if n<8: return fibonacci(n) - int(n==7)
else: return a(n-1) + a(n-3) + a(n-5) + a(n-7)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
New name from Joel B. Lewis, Nov 14 2012
|
|
STATUS
|
approved
|
|
|
|