OFFSET
0,2
COMMENTS
Related to Bernoulli numbers.
Essentially the same as A135854.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (6,-13,12,-4).
FORMULA
a(n+1) - a(n) = 2,4,9,21,... = A001792(n) + 1.
a(n+1) - 2*a(n) = 2 before A132045(n+1).
a(n) is the binomial transform of b(n) = 0,2,2,3,4,5,... = A001477(n) with 2 instead of 1. b(n) = (A164558(n) - A027641(n))/A027642(n)?
G.f.: x*(2-6*x+5*x^2) / ( (1-x)^2*(1-2*x)^2 ). - R. J. Mathar, Aug 06 2012
E.g.f.: x*exp(x)*(1 + exp(x)). - G. C. Greubel, Jan 18 2025
a(n) = n * A094373(n). - Alois P. Heinz, Jan 18 2025
MATHEMATICA
Table[n(1+2^(n-1)), {n, 0, 40}] (* or *) LinearRecurrence[{6, -13, 12, -4}, {0, 2, 6, 15}, 40] (* Harvey P. Dale, Oct 18 2013 *)
PROG
(PARI) a(n) = n*(1+2^(n-1)) \\ Michel Marcus, Mar 10 2013
(Magma) [n*(1 + 2^(n-1)): n in [0..40]]; // G. C. Greubel, Apr 19 2018
(Python)
def A215149(n): return n*(pow(2, n)+2)//2
print([A215149(n) for n in range(41)]) # G. C. Greubel, Jan 18 2025
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Paul Curtz, Aug 04 2012
STATUS
approved