OFFSET
0,1
COMMENTS
All terms are multiples of 3.
LINKS
Roger B. Nelson, Proof without Words: A Triangular Sum, Mathematics Magazine Vol. 78, No. 5 (December 2005), p. 395.
Index entries for linear recurrences with constant coefficients, signature (8,-21,22,-8).
FORMULA
a(n) = (2^(n+1) + 4) * (2^(n+1) + 5) / 6 - 4 + n.
More generally: let f(n, b) be the triangular sum Sum_{k=0..n} (2^k+b) * (2^k+b+1) / 2.
f(n, b) = (2^(n+1) + 3*b + 1) * (2^(n+1) + 3*b + 2) / 6 - (b + 1)^2 + b*(b + 1)*n / 2.
G.f.: ((b^2+3*b+2)/2 - (3*b^2+8*b+4)*x + (4*b^2+8*b+3)*x^2) / ((4*x-1) * (2*x-1) * (x-1)^2).
E.g.f.: exp(x) * ((6*b+3)*exp(x) + 2*exp(3*x) + 3(b^2+b)*x/2 + (3*b^2-3*b-4) / 2) / 3.
G.f.: 3*(5*x^2 - 5*x + 1) / ((4*x - 1) * (2*x - 1) * (x - 1)^2).
a(n) = 8*a(n-1) - 21*a(n-2) + 22*a(n-3) - 8*a(n-4) for n > 3.
This recurrence is valid for all sequences f(n,b).
E.g.f.: exp(x) * (9*exp(x) + 2*exp(3*x) + 3*x - 2) / 3. - Stefano Spezia, Aug 13 2021
MAPLE
a:= proc(n) option remember:
if n=0 then 3 else (2^n+1)*(2^n+2)/2+procname(n-1) fi:
end proc:
seq(a(n), n=0..30);
MATHEMATICA
Accumulate @ Table[(2^k + 1)*(2^k + 2)/2, {k, 0, 25}] (* Amiram Eldar, Jul 27 2021 *)
LinearRecurrence[{8, -21, 22, -8}, {3, 9, 24, 69}, 30] (* Harvey P. Dale, Nov 21 2021 *)
PROG
(PARI) a(n)=sum(k=0, n, (2^k+1)*(2^k+2)/2); \\ Michel Marcus, Jul 16 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Weisenhorn, Jul 13 2021
STATUS
approved