login
A110201
a(n) = sum of squares of numbers < 2^n having exactly [n/2]+1 ones in their binary expansion.
4
1, 9, 70, 535, 3906, 29274, 215900, 1628175, 12197570, 92830430, 704127060, 5400199350, 41331491124, 318871044756, 2456608834680, 19039140186495, 147401590706370, 1146463189301430, 8909683732878500, 69495629981713650
OFFSET
1,2
COMMENTS
a(n) equals the largest term in row n of triangle A110200.
FORMULA
a(n) = (4^n-1)/3*C(n-2, n\2) + (2^n-1)^2*C(n-2, n\2-1).
MATHEMATICA
Join[{1}, Table[Total[Select[Range[2^n], DigitCount[#, 2, 1]==Floor[ n/2]+ 1&]^2], {n, 2, 20}]] (* Harvey P. Dale, Aug 22 2021 *)
PROG
(PARI) a(n)=(4^n-1)/3*binomial(n-2, n\2)+(2^n-1)^2*binomial(n-2, n\2-1)
CROSSREFS
Cf. A110200 (triangle), A002450 (column 1), A110202 (column 2), A110203 (column 3), A110204 (column 4).
Sequence in context: A275680 A167534 A110202 * A045739 A098205 A000899
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jul 16 2005
STATUS
approved