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-6 of 6 results.

A331844 Number of compositions (ordered partitions) of n into distinct squares.

Original entry on oeis.org

1, 1, 0, 0, 1, 2, 0, 0, 0, 1, 2, 0, 0, 2, 6, 0, 1, 2, 0, 0, 2, 6, 0, 0, 0, 3, 8, 0, 0, 8, 30, 0, 0, 0, 2, 6, 1, 2, 6, 24, 2, 8, 6, 0, 0, 8, 30, 0, 0, 7, 32, 24, 2, 8, 30, 120, 6, 24, 2, 6, 0, 8, 36, 24, 1, 34, 150, 0, 2, 12, 30, 24, 0, 2, 38, 150, 0, 12, 78, 144, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2020

Keywords

Examples

			a(14) = 6 because we have [9,4,1], [9,1,4], [4,9,1], [4,1,9], [1,9,4] and [1,4,9].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember;
          `if`(i*(i+1)*(2*i+1)/6n, 0, b(n-i^2, i-1, p+1))+b(n, i-1, p)))
        end:
    a:= n-> b(n, isqrt(n), 0):
    seq(a(n), n=0..82);  # Alois P. Heinz, Jan 30 2020
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[i(i+1)(2i+1)/6 < n, 0, If[n == 0, p!, If[i^2 > n, 0, b[n - i^2, i - 1, p + 1]] + b[n, i - 1, p]]];
    a[n_] := b[n, Sqrt[n] // Floor, 0];
    a /@ Range[0, 82] (* Jean-François Alcover, Oct 29 2020, after Alois P. Heinz *)

A331843 Number of compositions (ordered partitions) of n into distinct triangular numbers.

Original entry on oeis.org

1, 1, 0, 1, 2, 0, 1, 2, 0, 2, 7, 2, 0, 2, 6, 1, 4, 6, 2, 12, 24, 3, 8, 0, 8, 32, 6, 2, 13, 26, 6, 34, 36, 0, 32, 150, 3, 20, 50, 14, 54, 126, 32, 32, 12, 55, 160, 78, 122, 44, 174, 4, 72, 294, 36, 201, 896, 128, 62, 180, 176, 164, 198, 852, 110, 320, 159, 212, 414
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2020

Keywords

Examples

			a(10) = 7 because we have [10], [6, 3, 1], [6, 1, 3], [3, 6, 1], [3, 1, 6], [1, 6, 3] and [1, 3, 6].
		

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember; `if`(n<1, 0,
          `if`(issqr(8*n+1), 1+h(n-1), h(n-1)))
        end:
    b:= proc(n, i, p) option remember; (t->
          `if`(t*(i+2)/3n, 0, b(n-t, i-1, p+1)))))((i*(i+1)/2))
        end:
    a:= n-> b(n, h(n), 0):
    seq(a(n), n=0..73);  # Alois P. Heinz, Jan 31 2020
  • Mathematica
    h[n_] := h[n] = If[n<1, 0, If[IntegerQ @ Sqrt[8n+1], 1 + h[n-1], h[n-1]]];
    b[n_, i_, p_] := b[n, i, p] = Function[t, If[t (i + 2)/3 < n, 0, If[n == 0, p!, b[n, i-1, p] + If[t>n, 0, b[n - t, i - 1, p + 1]]]]][(i(i + 1)/2)];
    a[n_] := b[n, h[n], 0];
    a /@ Range[0, 73] (* Jean-François Alcover, Apr 27 2020, after Alois P. Heinz *)

A331846 Number of compositions (ordered partitions) of n into distinct squarefree parts.

Original entry on oeis.org

1, 1, 1, 3, 2, 3, 9, 5, 12, 16, 21, 41, 42, 49, 59, 79, 130, 231, 230, 295, 226, 495, 609, 699, 1472, 1042, 1377, 2308, 2982, 3425, 3879, 4877, 7156, 7189, 13531, 14797, 13570, 19551, 27667, 30327, 36382, 47519, 60783, 70561, 78330, 136988, 121659, 174851
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2020

Keywords

Examples

			a(7) = 5 because we have [7], [6, 1], [5, 2], [2, 5] and [1, 6].
		

Crossrefs

A331847 Number of compositions (ordered partitions) of n into distinct prime powers (1 excluded).

Original entry on oeis.org

1, 0, 1, 1, 1, 3, 2, 5, 3, 11, 10, 13, 18, 19, 52, 30, 61, 77, 114, 109, 146, 260, 318, 341, 356, 631, 666, 927, 848, 1849, 1978, 2305, 2213, 3560, 4302, 4748, 5588, 6779, 13952, 9044, 15534, 16897, 25084, 20731, 29524, 34882, 49360, 50765, 55112, 106903, 83652, 128552, 106638
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2020

Keywords

Examples

			a(10) = 10 because we have [8, 2], [7, 3], [5, 3, 2], [5, 2, 3], [3, 7], [3, 5, 2], [3, 2, 5], [2, 8], [2, 5, 3] and [2, 3, 5].
		

Crossrefs

A331899 Number of compositions (ordered partitions) of n^3 into distinct cubes.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 7, 1, 1, 127, 1, 1, 127, 769, 10945, 15961, 86641, 86521, 430717, 4140367, 4146751, 93669001, 1538834041, 663998665, 6883029151, 1014140647, 20591858857, 121532206567, 1637261351983, 2981530899847, 5950338797191, 47072230385425
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 31 2020

Keywords

Examples

			a(6) = 7 because we have [216], [125, 64, 27], [125, 27, 64], [64, 125, 27], [64, 27, 125], [27, 125, 64] and [27, 64, 125].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember;
          `if`((i*(i+1)/2)^2n, 0, b(n-i^3, i-1, p+1))+b(n, i-1, p)))
        end:
    a:= n-> b(n^3, n, 0):
    seq(a(n), n=0..33);  # Alois P. Heinz, Jan 31 2020
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[(i(i+1)/2)^2 < n, 0, If[n == 0, p!, If[i^3 > n, 0, b[n - i^3, i - 1, p + 1]] + b[n, i - 1, p]]];
    a[n_] := b[n^3, n, 0];
    a /@ Range[0, 33] (* Jean-François Alcover, Nov 26 2020, after Alois P. Heinz *)

Formula

a(n) = A331845(A000578(n)).

A331923 Number of compositions (ordered partitions) of n into distinct perfect powers.

Original entry on oeis.org

1, 1, 0, 0, 1, 2, 0, 0, 1, 3, 2, 0, 2, 8, 6, 0, 1, 4, 6, 0, 2, 12, 24, 0, 2, 9, 8, 1, 8, 32, 30, 2, 7, 10, 32, 8, 11, 44, 150, 30, 34, 40, 18, 26, 20, 68, 78, 126, 56, 169, 80, 30, 40, 116, 294, 144, 162, 226, 182, 128, 66, 338, 348, 752, 199, 1048
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 01 2020

Keywords

Examples

			a(17) = 4 because we have [16, 1], [9, 8], [8, 9] and [1, 16].
		

Crossrefs

Programs

  • Maple
    N:= 200: # for a(0)..a(N)
    PP:= {1,seq(seq(b^i,i=2..floor(log[b](N))),b=2..floor(sqrt(N)))}:
    G:= mul(1+t*x^p, p=PP):
    F:= proc(n) local R, k, v;
      R:= normal(coeff(G, x, n));
      add(k!*coeff(R, t, k), k=1..degree(R, t))
    end proc:
    F(0):= 1:
    map(F, [$0..N]); # Robert Israel, Feb 03 2020
  • Mathematica
    M = 200;
    PP = Join[{1}, Table[Table[b^i, {i, 2, Floor[Log[b, M]]}], {b, 2, Floor[ Sqrt[M]]}] // Flatten // Union];
    G = Product[1 + t x^p, {p, PP}];
    a[n_] := Module[{R, k, v}, R = SeriesCoefficient[G, {x, 0, n}]; Sum[k! SeriesCoefficient[R, {t, 0, k}], {k, 1, Exponent[R, t]}]];
    a[0] = 1;
    a /@ Range[0, M] (* Jean-François Alcover, Oct 25 2020, after Robert Israel *)
Showing 1-6 of 6 results.