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.

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

Original entry on oeis.org

19, 85, 31, 469, 253, 2025, 5995, 4061, 15742, 48061, 8191, 220543, 384766, 3080161, 3272671, 6192631, 8385271, 31453021, 58159102, 249495467, 401469279, 268418041, 134193151, 2885548927, 1610563582, 8589393821, 33280753395, 83751780091, 171658174447
Offset: 3

Views

Author

Ilya Gutkovskiy, Dec 06 2022

Keywords

Examples

			31 is the smallest centered pentagonal number with binary weight 5 (31_10 = 11111_2), so a(5) = 31.
		

Crossrefs

Programs

  • 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 *)