Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A143438
a(n) = a(n-2) + a(n-3) + a(n-4) - a(n-6), with a(0) = a(2) = a(3) = 1, a(1) = 0 and a(4) = a(5) = 2.
23
1, 0, 1, 1, 2, 2, 3, 5, 6, 9, 12, 18, 24, 34, 48, 67, 94, 131, 185, 258, 362, 507, 711, 996, 1395, 1956, 2740, 3840, 5380, 7540, 10565, 14804, 20745, 29069, 40734, 57078, 79983, 112077, 157050, 220069, 308376, 432118, 605512, 848486, 1188956, 1666047, 2334578
OFFSET
0,5
COMMENTS
Expansion of 1/p(x), where p(x) = 1 - x^2 - x^3 - x^4 + x^6 is a Salem polynomial.
FORMULA
G.f.: 1/(1 - x^2 - x^3 - x^4 + x^6). - Colin Barker, Nov 24 2012
MAPLE
seq(coeff(series(1/(1-x^2-x^3-x^4+x^6), x, n+1), x, n), n = 0..50); # G. C. Greubel, Dec 06 2019
MATHEMATICA
CoefficientList[Series[1/(1-x^2-x^3-x^4+x^6), {x, 0, 50}], x]
LinearRecurrence[{0, 1, 1, 1, 0, -1}, {1, 0, 1, 1, 2, 2}, 50] (* G. C. Greubel, Dec 06 2019 *)
PROG
(Maxima) makelist(ratcoef(taylor(1/(1 -x^2 -x^3 -x^4 +x^6), x, 0, n), x, n), n, 0, 50); /* Franck Maminirina Ramaharo, Oct 31 2018 */
(PARI) my(x='x+O('x^50)); Vec(1/(1-x^2-x^3-x^4+x^6)) \\ G. C. Greubel, Nov 03 2018
(Magma) R<x>:=PowerSeriesRing(Integers(), 50); Coefficients(R!(1/(1 -x^2-x^3-x^4+x^6))); // G. C. Greubel, Nov 03 2018
(Sage)
def A143438_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P(1/(1-x^2-x^3-x^4+x^6)).list()
A143438_list(50) # G. C. Greubel, Dec 06 2019
(GAP) a:=[1, 0, 1, 1, 2, 2];; for n in [7..50] do a[n]:=a[n-2]+a[n-3]+a[n-4]-a[n-6]; od; a; # G. C. Greubel, Dec 06 2019
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Edited, new name (after Colin Barker), more terms, and offset corrected by Franck Maminirina Ramaharo, Oct 30 2018
STATUS
approved