OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
Triangular number 153 = '10011001' in binary, the number of 1's equals the number of 0's, so 153 is a term.
MATHEMATICA
Select[Table[n*(n + 1)/2, {n, 0, 330}], Equal @@ DigitCount[#, 2] &] (* Amiram Eldar, Jun 15 2021 *)
PROG
(PARI) isA031443(n)=2*hammingweight(n)==exponent(n)+1
list(lim)=my(v=List(), n=4, t); while((t=n*n++/2)<=lim, if(isA031443(t), listput(v, t))); Vec(v) \\ Charles R Greathouse IV, Jun 21 2021
(Python)
A345348_list = [n for n in (m*(m+1)//2 for m in range(10**6)) if len(bin(n))-2 == 2*bin(n).count('1')] # Chai Wah Wu, Jun 21 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ctibor O. Zizka, Jun 15 2021
EXTENSIONS
More terms from Jinyuan Wang, Jun 15 2021
STATUS
approved