login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A122504
a(n) = -a(n-6) + 3*a(n-5) + a(n-4) - 7*a(n-3) + a(n-2) + 3*a(n-1).
0
1, 1, 1, 1, 1, 1, 0, -3, -13, -39, -107, -273, -675, -1624, -3847, -8995, -20851, -47995, -109915, -250695, -570024, -1292915, -2926953, -6616051, -14936895, -33690357, -75931283, -171029936, -385046687, -866536007, -1949510615, -4384874471, -9860587191, -22170707871, -49842661456
OFFSET
1,8
COMMENTS
Original name started "Bi_Steinbach heptagon recursion".
FORMULA
O.g.f.: x*(1-x-3*x^2)*(1-x-x^2)/((1-2*x-x^2+x^3)*(1-x-2*x^2+x^3)). - R. J. Mathar, Aug 22 2008
MATHEMATICA
a[0] = 1; a[1] = 1; a[2] = 1; a[3] = 1; a[4] = 1; a[5] = 1; a[n_] := a[n] = -a[n - 6] + 3 a[n - 5] + a[n - 4] - 7 a[n - 3] + a[n - 2] + 3 a[n - 1] Table[a[n], {n, 0, 30}]
M = {{0, 1, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 0}, {0, 0, 0, 1, 0, 0}, {0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 0, 1}, {-1, 3, 1, -7, 1, 3}} v[1] = {1, 1, 1, 1, 1, 1} v[n_] := v[n] = M.v[n - 1] a = Table[Floor[v[n][[1]]], {n, 1, 50}]
LinearRecurrence[{3, 1, -7, 1, 3, -1}, {1, 1, 1, 1, 1, 1}, 40] (* or *) Rest[ CoefficientList[ Series[x(1-x-3x^2)(1-x-x^2)/((1-2x-x^2+x^3)(1-x-2x^2+x^3)), {x, 0, 40}], x]] (* Harvey P. Dale, Jun 24 2011 *)
CROSSREFS
Sequence in context: A166911 A103657 A320661 * A103277 A166897 A167910
KEYWORD
sign
AUTHOR
STATUS
approved