login
A048506
a(n) = T(0,n), array T given by A048505.
3
1, 2, 7, 25, 81, 241, 673, 1793, 4609, 11521, 28161, 67585, 159745, 372737, 860161, 1966081, 4456449, 10027009, 22413313, 49807361, 110100481, 242221057, 530579457, 1157627905, 2516582401, 5452595201, 11777605633, 25367150593, 54492397569, 116769423361
OFFSET
0,2
COMMENTS
n-th difference of a(n), a(n-1), ..., a(0) is (1, 4, 9, 16, 25, ...).
Similar to A000697 in so far as it can be seen as the transform of 1, 1, 4, 9, 16, ... by a variant of the boustrophedon algorithm (see the Sage implementation). - Peter Luschny, Oct 30 2014
FORMULA
a(n) = n*(n+1)*2^(n-2) + 1 = A001788(n) + 1. - Ralf Stephan, Jan 16 2004
a(n) = 7*a(n-1)-18*a(n-2)+20*a(n-3)-8*a(n-4). - Colin Barker, Nov 26 2014
G.f.: -(8*x^3-11*x^2+5*x-1) / ((x-1)*(2*x-1)^3). - Colin Barker, Nov 26 2014
MATHEMATICA
LinearRecurrence[{7, -18, 20, -8}, {1, 2, 7, 25}, 30] (* Jean-François Alcover, Jun 11 2019 *)
PROG
(Magma) [n*(n+1)*2^(n-2) + 1: n in [0..30]]; // Vincenzo Librandi, Sep 26 2011
(Sage)
def sq():
yield 1
for n in PositiveIntegers():
yield n*n
def bous_variant(f):
k = 0
am = next(f)
a = [am]
while True:
yield am
am = next(f)
a.append(am)
for j in range(k, -1, -1):
am += a[j]
a[j] = am
k += 1
b = bous_variant(sq())
print([next(b) for _ in range(26)]) # Peter Luschny, Oct 30 2014
(PARI) Vec(-(8*x^3-11*x^2+5*x-1)/((x-1)*(2*x-1)^3) + O(x^100)) \\ Colin Barker, Nov 26 2014
CROSSREFS
Sequence in context: A247880 A330051 A145130 * A335718 A169651 A289446
KEYWORD
nonn,easy
STATUS
approved