login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) is the index of the smallest n-gonal number with binary weight n.
1

%I #7 Dec 20 2022 11:32:31

%S 6,13,9,10,24,58,34,55,67,151,134,187,201,691,350,623,1082,1870,2302,

%T 3171,5017,13863,13230,6663,24357,50397,35604,60347,63810,107019,

%U 181517,365595,624858,1345485,1002585,1969415,1191179,7651731,4592173,7279863,7403686,17923182

%N a(n) is the index of the smallest n-gonal number with binary weight n.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PolygonalNumber.html">Polygonal Number</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%t 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 *)

%Y Cf. A000120, A211201, A231897, A359092.

%K nonn,base

%O 3,1

%A _Ilya Gutkovskiy_, Dec 16 2022