login
A131568
a(n) = sum of numbers which in base 2 contain exactly n digits 1 and not more than n digits 0.
3
0, 3, 45, 630, 8925, 128898, 1891890, 28113228, 421717725, 6372696330, 96865261350, 1479397776948, 22684103302770, 348986220258900, 5384358887026500, 83278084352019480, 1290810308357922525, 20045524792117559130, 311819274557663622750, 4857816066846093281700
OFFSET
0,2
LINKS
FORMULA
a(n) = (2*n)!*(2^(2*n)-1)/(2*n!*n!). [Corrected by Michel Marcus, Aug 22 2022]
From Peter Luschny, Aug 22 2022: (Start)
a(n) = (4^n - 1)*binomial(2*n, n) / 2.
a(n) = [x^n] ((1 - 16*x)^(-1/2) - (1 - 4*x)^(-1/2)) / 2. (End)
EXAMPLE
For n=2, we have these integers in base 2: 11, 101, 110, 1001, 1010, and 1100; so a(2) = 3+5+6+9+10+12 = 45.
MATHEMATICA
Array[(4^# - 1)*Binomial[2 #, #]/2 &, 20, 0] (* Michael De Vlieger, Aug 22 2022 *)
CROSSREFS
Sequence in context: A270064 A141445 A076140 * A287031 A124487 A266698
KEYWORD
nonn,base,easy
AUTHOR
Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Aug 27 2007
EXTENSIONS
More terms from Peter Luschny, Aug 22 2022
STATUS
approved