OFFSET
1,2
LINKS
Eric Weisstein's World of Mathematics, Centered Triangular Number
EXAMPLE
235 is the smallest centered triangular number with binary weight 6 (235_10 = 11101011_2), so a(6) = 235.
MATHEMATICA
seq[len_, nmax_] := Module[{s = Table[0, {len}], n = 1, c = 0, bw, ct}, While[c < len && n < nmax, bw = DigitCount[ct = 3*n*(n-1)/2 + 1, 2, 1]; If[bw <= len && s[[bw]] == 0, c++; s[[bw]] = ct]; n++]; s]; seq[30, 10^6] (* Amiram Eldar, Dec 26 2022 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ilya Gutkovskiy, Dec 25 2022
STATUS
approved