A142474 1 followed by A141015.
1, 0, 1, 2, 4, 9, 19, 41, 88, 189, 406, 872, 1873, 4023, 8641, 18560, 39865, 85626, 183916, 395033, 848491, 1822473, 3914488, 8407925, 18059374, 38789712, 83316385, 178955183, 384377665, 825604416, 1773314929, 3808901426, 8181135700, 17572253481, 37743426307
Offset: 1
Links
- Colin Barker, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,2,1).
Programs
-
Magma
[n le 3 select (1-(-1)^n)/2 else Self(n-1) +2*Self(n-2) +Self(n-3): n in [1..50]]; // G. C. Greubel, Apr 14 2021
-
Maple
m:=50; S:=series( x*(1-x-x^2)/(1-x-2*x^2-x^3), x, m+1): seq(coeff(S, x, j), j=1..m); # G. C. Greubel, Apr 14 2021
-
Mathematica
m:= 80; Table[SeriesCoefficient[Series[(1+t)/(1+t+t^3), {t,0,m}], n], {n,0,m,2}]
-
PARI
Vec(x*(1-x-x^2)/(1-x-2*x^2-x^3) + O(x^50)) \\ Colin Barker, Jun 29 2017
-
Sage
def A142474_list(prec): P.
= PowerSeriesRing(ZZ, prec) return P( x*(1-x-x^2)/(1-x-2*x^2-x^3) ).list() a=A142474_list(51); a[1:] # G. C. Greubel, Apr 14 2021
Formula
From Colin Barker, Jun 29 2017: (Start)
G.f.: x*(1 - x - x^2) / (1 - x - 2*x^2 - x^3).
a(n) = a(n-1) + 2*a(n-2) + a(n-3) for n>3.
(End)
Extensions
More terms from G. C. Greubel, Jun 26 2017
Comments