A170881 a(0)=0; thereafter a(n) = (3*n+1)*2^(n-2)+1.
0, 1, 3, 8, 21, 53, 129, 305, 705, 1601, 3585, 7937, 17409, 37889, 81921, 176129, 376833, 802817, 1703937, 3604481, 7602177, 15990785, 33554433, 70254593, 146800641, 306184193, 637534209, 1325400065, 2751463425, 5704253441, 11811160065, 24427626497, 50465865729
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (5,-8,4).
Programs
-
Mathematica
Join[{0,1},Table[(3n+1)2^(n-2)+1,{n,40}]] (* Harvey P. Dale, Nov 26 2023 *)
Formula
From Chai Wah Wu, Apr 15 2025: (Start)
a(n) = 5*a(n-1) - 8*a(n-2) + 4*a(n-3) for n > 4.
G.f.: x*(-x^3 - x^2 + 2*x - 1)/((x - 1)*(2*x - 1)^2). (End)
E.g.f.: (4*exp(x) - 3 + exp(2*x)*(3*x - 1))/4. - Stefano Spezia, Apr 15 2025
Extensions
Zero prepended by Harvey P. Dale, Nov 26 2023