A106469 Expansion of (1 + x^2)*(1 + 2*x)/(1 - x^2).
1, 2, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,1).
Crossrefs
Row sums of A106468.
Programs
-
Mathematica
CoefficientList[Series[(1+x^2)(1+2x)/(1-x^2),{x,0,95}],x] (* James C. McMahon, Feb 02 2024 *)
Formula
a(0)=1, a(n)=(2-0^((n-1)/2))(1-(-1)^n)+(2-0^(n/2))(1+(-1)^n)/2, n>1.