login
A343291
a(n) = (n-2)*2^(n-1) + n + 2.
1
1, 2, 4, 9, 22, 55, 136, 329, 778, 1803, 4108, 9229, 20494, 45071, 98320, 213009, 458770, 983059, 2097172, 4456469, 9437206, 19922967, 41943064, 88080409, 184549402, 385875995, 805306396, 1677721629, 3489660958, 7247757343, 15032385568, 31138512929, 64424509474
OFFSET
0,2
COMMENTS
a(n) is the cardinality of set s(n), where s(0) = {0} and s(n+1) = s(n) union {(i+j+1)/2 : i,j in s(n)}. s(4) = {0, 1/2, 3/4, 7/8, 15/16, 1, 17/16, 9/8, 19/16, 5/4, 21/16, 11/8, 23/16, 3/2, 25/16, 13/8, 27/16, 7/4, 29/16, 15/8, 31/16, 2} has cardinality a(4) = 22.
FORMULA
G.f.: -(x^3-5*x^2+4*x-1)/((2*x-1)^2*(x-1)^2).
MAPLE
a:= n-> (n-2)*2^(n-1)+n+2:
seq(a(n), n=0..35);
CROSSREFS
Partial differences give A005183 (shifted).
Cf. A343264.
Sequence in context: A098719 A274289 A265023 * A290996 A373245 A198520
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Apr 10 2021
STATUS
approved