OFFSET
3,1
LINKS
Eric Weisstein's World of Mathematics, Centered Polygonal Number
EXAMPLE
31 is the smallest centered pentagonal number with binary weight 5 (31_10 = 11111_2), so a(5) = 31.
MATHEMATICA
c[n_, k_] := n*k*(k + 1)/2 + 1; a[n_] := Module[{k = 1, ck}, While[DigitCount[ck = c[n, k], 2, 1] != n, k++]; ck]; Array[a, 25, 3] (* Amiram Eldar, Dec 09 2022 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ilya Gutkovskiy, Dec 06 2022
STATUS
approved