OFFSET
0,3
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..8191
FORMULA
Row sums of triangle A143156.
G.f. A(x) satisfies: A(x) = 2*A(x^2)*(1 + x) + x/(1 - x)^3. - Ilya Gutkovskiy, Oct 30 2019
a(n) ~ n^2. - Amiram Eldar, Sep 10 2024
EXAMPLE
MATHEMATICA
{0}~Join~Accumulate@ Array[IntegerExponent[(2 #)^#, 2] &, 56] (* Michael De Vlieger, Sep 29 2019 *)
PROG
(Python)
def A143157(n): return sum(i*(~i&i-1).bit_length() for i in range(2, 2*n+1, 2))>>1 # Chai Wah Wu, Jul 11 2022
(Python)
def A143157(n): return n**2+(sum(b-2*a<<b for a, b in enumerate((i for i, j in enumerate(bin(n)[:1:-1], 0) if j=='1')))>>1) # Chai Wah Wu, Jun 01 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Jul 27 2008
EXTENSIONS
a(0) = 0 prepended and more terms computed by Antti Karttunen, Oct 25 2014
STATUS
approved
