OFFSET
1,1
COMMENTS
It turns out that b(n,k) = A087322(n,k) = (n + 1)*2^k - 1 for 1 <= k <= n (without the 0th column). - Petros Hadjicostas, Feb 15 2021
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (6,-13,12,-4).
FORMULA
G.f.: -x*(-3 + 2*x + 4*x^2) / ( (2*x-1)^2*(x-1)^2 ). - R. J. Mathar, May 29 2011
E.g.f.: exp(x)*(2*exp(x)*(1 + 2*x) - 2 - 3*x). - Stefano Spezia, Oct 16 2023
EXAMPLE
One way to view it is to begin with n = 5, then 5 + 6 = 11 --> 11 + 12 = 23 --> 23 + 24 = 47 --> 47 + 48 = 95 --> 95 + 96 = 191. There are n steps, in this case 5, that give the sum 11 + 23 + 47 + 95 + 191 = 367. This is the same as (2*5+1) + (4*5+3) + (8*5+7) + (16*5+15) + (32*5+31). The formula gives (5+1)*2^(5+1) - 3*5 - 2 = 6*64 - 17 = 367.
MATHEMATICA
LinearRecurrence[{6, -13, 12, -4}, {3, 16, 53, 146}, 40] (* or *)
Array[(#+1)2^(#+1)-3#-2&, 40] (* Paolo Xausa, Oct 17 2023 *)
PROG
(Magma) [(n+1) * 2^(n+1) - 3*n - 2 : n in [1..30]]; // Vincenzo Librandi, Sep 29 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
J. M. Bergot, May 17 2011
STATUS
approved