login
A358930
a(n) is the smallest n-gonal number with binary weight n.
3
21, 169, 117, 190, 1404, 9976, 3961, 11935, 19966, 113401, 98155, 208879, 261501, 3338221, 916475, 3100671, 9943039, 31457140, 50322871, 100523871, 264240373, 2113871829, 2012739435, 532673535, 7415513007, 33017544153, 17112759966, 50983861215, 59039022015
OFFSET
3,1
EXAMPLE
117 is the smallest pentagonal number with binary weight 5 (117_10 = 1110101_2), so a(5) = 117.
MATHEMATICA
p[n_, k_] := (n - 2)*k*(k - 1)/2 + k; a[n_] := Module[{k = 1, pk}, While[DigitCount[pk = p[n, k], 2, 1] != n, k++]; pk]; Array[a, 25, 3] (* Amiram Eldar, Dec 09 2022 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ilya Gutkovskiy, Dec 06 2022
STATUS
approved