A111587 a(n) = 2*a(n-1) + 2*a(n-3) + a(n-4), a(0) = 1, a(1) = 4, a(2) = 9, a(3) = 20.
1, 4, 9, 20, 49, 120, 289, 696, 1681, 4060, 9801, 23660, 57121, 137904, 332929, 803760, 1940449, 4684660, 11309769, 27304196, 65918161, 159140520, 384199201, 927538920, 2239277041, 5406093004, 13051463049, 31509019100, 76069501249
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (2,0,2,1).
Programs
-
Magma
I:=[1,4,9,20]; [n le 4 select I[n] else 2*Self(n-1) +2*Self(n-3)+Self(n-4): n in [1..35]]; // Vincenzo Librandi, Oct 01 2017
-
Mathematica
LinearRecurrence[{2,0,2,1},{1,4,9,20},30] (* Harvey P. Dale, Jul 26 2011 *) CoefficientList[Series[(x + 1)^2 / ((x^2 + 1) (1 - 2 x - x^2)), {x, 0, 33}], x] (* Vincenzo Librandi, Oct 01 2017 *)
Formula
G.f.: (x+1)^2/((x^2+1)*(1-2*x-x^2)). [sign flipped by R. J. Mathar, Nov 10 2009]
Comments