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.

Previous Showing 11-17 of 17 results.

A332016 Number of compositions (ordered partitions) of n into distinct octagonal numbers.

Original entry on oeis.org

1, 1, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 2, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 2, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6, 0, 0, 1, 2, 0, 0, 6, 24, 0, 0, 2, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 04 2020

Keywords

Examples

			a(30) = 6 because we have [21, 8, 1], [21, 1, 8], [8, 21, 1], [8, 1, 21], [1, 21, 8] and [1, 8, 21].
		

Crossrefs

A339430 Number of compositions (ordered partitions) of n into an even number of distinct squares.

Original entry on oeis.org

1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 2, 2, 0, 0, 2, 24, 0, 0, 0, 2, 0, 0, 2, 0, 24, 2, 2, 0, 0, 0, 2, 24, 0, 0, 0, 26, 24, 2, 2, 24, 0, 0, 24, 2, 0, 0, 2, 24, 24, 0, 28, 24, 0, 2, 0, 24, 24, 0, 2, 26, 24, 0, 0, 72, 24, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 04 2020

Keywords

Examples

			a(30) = 24 because we have [16, 9, 4, 1] (24 permutations).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, irem(1+p, 2)*p!,
         (s-> `if`(s>n, 0, b(n, i+1, p)+b(n-s, i+1, p+1)))(i^2))
        end:
    a:= n-> b(n, 1, 0):
    seq(a(n), n=0..100);  # Alois P. Heinz, Dec 04 2020
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, Mod[1 + p, 2]*p!,
         With[{s = i^2}, If[s > n, 0, b[n, i + 1, p] +
         b[n - s, i + 1, p + 1]]]];
    a[n_] := b[n, 1, 0];
    a /@ Range[0, 100] (* Jean-François Alcover, Mar 09 2021, after Alois P. Heinz *)

A339431 Number of compositions (ordered partitions) of n into an odd number of distinct squares.

Original entry on oeis.org

0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 6, 0, 1, 0, 0, 0, 0, 6, 0, 0, 0, 1, 6, 0, 0, 6, 6, 0, 0, 0, 0, 6, 1, 0, 6, 0, 0, 6, 6, 0, 0, 6, 6, 0, 0, 7, 6, 0, 0, 6, 6, 120, 6, 0, 0, 6, 0, 6, 12, 0, 1, 6, 126, 0, 0, 12, 6, 0, 0, 0, 12, 126, 0, 12, 6, 120, 0, 7
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 04 2020

Keywords

Examples

			a(55) = 120 because we have [25, 16, 9, 4, 1] (120 permutations).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, irem(p, 2)*p!,
         (s-> `if`(s>n, 0, b(n, i+1, p)+b(n-s, i+1, p+1)))(i^2))
        end:
    a:= n-> b(n, 1, 0):
    seq(a(n), n=0..100);  # Alois P. Heinz, Dec 04 2020
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, Mod[p, 2]*p!, With[{s = i^2}, If[s > n, 0, b[n, i + 1, p] + b[n - s, i + 1, p + 1]]]];
    a[n_] := b[n, 1, 0];
    a /@ Range[0, 100] (* Jean-François Alcover, Mar 14 2021, after Alois P. Heinz *)

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

A331983 Number of compositions (ordered partitions) of n into distinct squares > 1.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 8, 0, 0, 0, 0, 2, 0, 1, 0, 6, 0, 2, 2, 0, 0, 0, 8, 0, 0, 0, 7, 6, 0, 2, 2, 24, 0, 6, 0, 2, 0, 0, 8, 6, 0, 1, 32, 0, 0, 2, 6, 6, 0, 0, 2, 32, 0, 0, 12, 30, 0, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 03 2020

Keywords

Examples

			a(25) = 3 because we have [25], [16, 9] and [9, 16].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember;
          `if`(n=0, p!, `if`(i*(i+1)*(2*i+1)/6-1n, 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..87);  # Alois P. Heinz, Feb 03 2020
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i(i+1)(2i+1)/6 - 1 < n, 0, If[i^2 > n, 0, b[n - i^2, i - 1, p + 1]] + b[n, i - 1, p]]];
    a[n_] := b[n, Floor@Sqrt[n], 0];
    a /@ Range[0, 87] (* Jean-François Alcover, Nov 26 2020, after Alois P. Heinz *)

A332006 Number of compositions (ordered partitions) of n into distinct centered square numbers.

Original entry on oeis.org

1, 1, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 2, 6, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 2, 6, 0, 0, 0, 0, 0, 0, 2, 6, 0, 1, 2, 6, 24, 0, 2, 6, 0, 0, 0, 0, 0, 0, 2, 6, 0, 0, 0, 6, 24, 1, 2, 0, 0, 0, 4, 12, 0, 0, 0, 6, 24, 0, 2, 6, 0, 0, 0, 12, 48, 0, 0, 0, 24, 121, 4, 6
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 04 2020

Keywords

Examples

			a(19) = 6 because we have [13, 5, 1], [13, 1, 5], [5, 13, 1], [5, 1, 13], [1, 13, 5] and [1, 5, 13].
		

Crossrefs

A348326 Number of compositions (ordered partitions) of n into two or more distinct squares.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Oct 12 2021

Keywords

Examples

			For n = 14 there exists the following six solutions: 1+4+9 = 1+9+4 = 4+1+9 = 4+9+1 = 9+1+4 = 9+4+1 = 14, therefore a(14) = 6. - _Antti Karttunen_, Oct 17 2021
		

Crossrefs

Previous Showing 11-17 of 17 results.