OFFSET
3,1
LINKS
Eric Weisstein's World of Mathematics, Polygonal Number
MATHEMATICA
p[n_, k_] := (n - 2)*k*(k - 1)/2 + k; a[n_] := Module[{k = 1}, While[DigitCount[p[n, k], 2, 1] != n, k++]; k]; Array[a, 30, 3] (* Amiram Eldar, Dec 17 2022 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ilya Gutkovskiy, Dec 16 2022
STATUS
approved