OFFSET
3,1
LINKS
Eric Weisstein's World of Mathematics, Polygonal Number
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