A099425 Expansion of (1+x^2)/(1-2*x-x^2).
1, 2, 6, 14, 34, 82, 198, 478, 1154, 2786, 6726, 16238, 39202, 94642, 228486, 551614, 1331714, 3215042, 7761798, 18738638, 45239074, 109216786, 263672646, 636562078, 1536796802, 3710155682, 8957108166, 21624372014, 52205852194, 126036076402, 304278004998
Offset: 0
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (2,1).
Programs
-
Haskell
a099425 = sum . a102413_row -- Reinhard Zumkeller, Apr 15 2014
-
Maple
a:= n-> (<<0|1>, <1|2>>^n. <<2, 2>>)[1, 1]-0^n: seq(a(n), n=0..30); # Alois P. Heinz, Jan 26 2018
-
Mathematica
CoefficientList[Series[(1+x^2)/(1-2x-x^2),{x,0,30}],x] (* or *) LinearRecurrence[{2,1},{1,2,6},40] (* Harvey P. Dale, Mar 23 2020 *)
Formula
a(n) = (1+sqrt(2))^n + (1-sqrt(2))^n - 0^n see silver mean (A014176).
a(n) = Sum_{k=0..n} A000129(n+1-k)*C(1, k/2)*(1+(-1)^k)/2.
a(n) = 2*A001333(n) - 0^n.
a(n) = round((1+sqrt(2))^n). - Bruno Berselli, Feb 04 2013
G.f.: G(0) - 1, where G(k) = 1 + 1/(1 - x*(2*k-1)/(x*(2*k+1) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jul 30 2013
Comments