OFFSET
0,2
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-4).
FORMULA
a(0) = 1, a(1) = 3; for n > 1, a(n) = (n+4)*2^(n-2).
G.f.: (1-x)*(1-2*x^2)/(1-2*x)^2.
Binomial transform of [1, 2, 1, 4, 1, 6, 1, 8, ...]. - Gary W. Adamson, Sep 29 2007
E.g.f.: (x + exp(2*x)*(2 + x))/2. - Stefano Spezia, Oct 04 2024
PROG
(Magma) m:=16; S:=&cat[ [ 1, 2*i ]: i in [0..m] ]; T:=[ &+[ Binomial(j-1, k-1)*S[k]: k in [1..j] ]: j in [1..2*m] ]; U:=[ T[n+1]-T[n]: n in[1..2*m-1] ]; [ U[n+1]-U[n]: n in[1..2*m-2] ]; // Klaus Brockhaus, Jun 17 2007
(PARI) {m=29; print1(1, ", ", 3, ", "); for(n=2, m, print1((n+4)*2^(n-2), ", "))} \\ Klaus Brockhaus, Jun 17 2007
(Python)
def A129954(n): return n+4<<n-2 if n>1 else 2*n+1 # Chai Wah Wu, Oct 03 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Jun 10 2007
EXTENSIONS
Edited and extended by Klaus Brockhaus, Jun 17 2007
STATUS
approved