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.

Showing 1-5 of 5 results.

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

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

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

Original entry on oeis.org

5, 4, 9, 5, 20, 9, 29, 18, 40, 61, 52, 77, 121, 85, 235, 165, 281, 393, 438, 586, 645, 884, 1997, 777, 1597, 3598, 4901, 4442, 8249, 4582, 10685, 5362, 28473, 23140, 41305, 41266, 67947, 82953, 101229, 151121, 236221, 257326, 385090, 254725, 713021, 669890
Offset: 3

Views

Author

Ilya Gutkovskiy, Dec 16 2022

Keywords

Crossrefs

Programs

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

A359317 a(n) is the smallest tetrahedral number with binary weight n.

Original entry on oeis.org

0, 1, 10, 35, 120, 220, 455, 2024, 1771, 4060, 14190, 16215, 129766, 32509, 1414910, 1823471, 5159805, 8171255, 4192244, 24117100, 30865405, 334985911, 192937325, 1610599145, 1048440315, 4261347265, 4244012991, 63828916911, 213588635511, 133110357279
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 25 2022

Keywords

Examples

			455 is the smallest tetrahedral number with binary weight 6 (455_10 = 111000111_2), so a(6) = 455.
		

Crossrefs

Programs

  • Mathematica
    seq[len_,nmax_] := Module[{s = Table[0,{len}], n = 0, c = 0, bw, t}, While[c < len && n < nmax, bw = DigitCount[t = n*(n+1)*(n+2)/6, 2, 1] + 1; If[bw <= len && s[[bw]] == 0, c++; s[[bw]] = t]; n++]; s]; seq[30, 10^6] (* Amiram Eldar, Dec 26 2022 *)

A359318 a(n) is the smallest square pyramidal number with binary weight n.

Original entry on oeis.org

0, 1, 5, 14, 30, 55, 819, 506, 1785, 1015, 16206, 51039, 98021, 81375, 1113775, 964535, 2607099, 5494655, 1048061, 6029275, 50331190, 356343295, 534555645, 516941815, 4021378559, 2143222510, 12842950505, 34091142526, 68651299705, 124545644405, 273736383990
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 25 2022

Keywords

Examples

			819 is the smallest square pyramidal number with binary weight 6 (819_10 = 1100110011_2), so a(6) = 819.
		

Crossrefs

Programs

  • Maple
    V:= Array(0..40): count:= 0:
    for k from 1 while count < 40 do
      m:= k*(k+1)*(2*k+1)/6;
      w:= convert(convert(m,base,2),`+`);
      if w <= 40 and V[w] = 0 then
        count:= count+1; V[w]:= m;
      fi
    od:
    convert(V,list); # Robert Israel, Dec 26 2022
  • Mathematica
    seq[len_,nmax_] := Module[{s = Table[0,{len}], n = 0, c = 0, bw, sp}, While[c < len && n < nmax, bw = DigitCount[sp = n*(n+1)*(2*n+1)/6, 2, 1] + 1; If[bw <= len && s[[bw]] == 0, c++; s[[bw]] = sp]; n++]; s]; seq[31, 10^6] (* Amiram Eldar, Dec 26 2022 *)
Showing 1-5 of 5 results.