This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A358931 #8 Feb 16 2025 08:34:04 %S A358931 35,30,405,95,6860,765,28855,7923,96760,380091,259064,915915,3845501, %T A358931 1436415,32471830,11992255,62904941,182171613,266182382,670936891, %U A358931 939382515,2533347310,30530860911,1876688877,16972115903,201845686175,529756691451,409027868651,2713039388125 %N A358931 a(n) is the smallest n-gonal pyramidal number with binary weight n. %H A358931 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PyramidalNumber.html">Pyramidal Number</a> %H A358931 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a> %e A358931 405 is the smallest pentagonal pyramidal number with binary weight 5 (405_10 = 110010101_2), so a(5) = 405. %t A358931 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 *) %Y A358931 Cf. A000120, A358930, A358932. %K A358931 nonn,base %O A358931 3,1 %A A358931 _Ilya Gutkovskiy_, Dec 06 2022