A097809 a(n) = 5*2^n - 2*n - 4.
1, 4, 12, 30, 68, 146, 304, 622, 1260, 2538, 5096, 10214, 20452, 40930, 81888, 163806, 327644, 655322, 1310680, 2621398, 5242836, 10485714, 20971472, 41942990, 83886028, 167772106, 335544264, 671088582, 1342177220, 2684354498
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Tamas Lengyel, On p-adic properties of the Stirling numbers of the first kind, Journal of Number Theory, 148 (2015) 73-94.
- Index entries for linear recurrences with constant coefficients, signature (4,-5,2).
Programs
-
Magma
[5*2^n-2*n-4: n in [0..30]]; // Vincenzo Librandi, Feb 24 2013
-
Mathematica
LinearRecurrence[{4,-5,2},{1,4,12},30] (* Harvey P. Dale, Oct 11 2018 *)
-
Sage
[5*2^n -2*(n+2) for n in (0..30)] # G. C. Greubel, Dec 30 2021
Formula
G.f.: (1+x^2)/((1-x)^2*(1-2*x)).
a(n) = 2*a(n-1) + 2*n, n>0.
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3), with a(0)=1, a(1)=4, a(2)=12.
E.g.f.: 5*exp(2*x) - 2*(2+x)*exp(x). - G. C. Greubel, Dec 30 2021
Comments