login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A359315
a(n) is the smallest centered triangular number with binary weight n.
1
1, 10, 19, 46, 31, 235, 631, 1786, 1999, 7669, 7039, 12286, 16381, 180094, 114679, 949231, 2086831, 2883574, 4175839, 12480511, 50329585, 62898151, 132638719, 234618814, 771743710, 2883510271, 4269733885, 8254119871, 17045499901, 33214168831
OFFSET
1,2
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