OFFSET
3,1
LINKS
Eric Weisstein's World of Mathematics, Pyramidal Number
EXAMPLE
405 is the smallest pentagonal pyramidal number with binary weight 5 (405_10 = 110010101_2), so a(5) = 405.
MATHEMATICA
p[n_, k_] := k*(k + 1)*((n - 2)*k + 5 - n)/6; a[n_] := Module[{k = 1, pk}, While[DigitCount[pk = p[n, k], 2, 1] != n, k++]; pk]; Array[a, 30, 3] (* Amiram Eldar, Dec 09 2022 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ilya Gutkovskiy, Dec 06 2022
STATUS
approved