cp's OEIS Frontend

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.

A358930 a(n) is the smallest n-gonal number with binary weight n.

Original entry on oeis.org

21, 169, 117, 190, 1404, 9976, 3961, 11935, 19966, 113401, 98155, 208879, 261501, 3338221, 916475, 3100671, 9943039, 31457140, 50322871, 100523871, 264240373, 2113871829, 2012739435, 532673535, 7415513007, 33017544153, 17112759966, 50983861215, 59039022015
Offset: 3

Views

Author

Ilya Gutkovskiy, Dec 06 2022

Keywords

Examples

			117 is the smallest pentagonal number with binary weight 5 (117_10 = 1110101_2), so a(5) = 117.
		

Crossrefs

Programs

  • Mathematica
    p[n_, k_] := (n - 2)*k*(k - 1)/2 + k; a[n_] := Module[{k = 1, pk}, While[DigitCount[pk = p[n, k], 2, 1] != n, k++]; pk]; Array[a, 25, 3] (* Amiram Eldar, Dec 09 2022 *)