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

A339441 Number of compositions (ordered partitions) of n into an even number of distinct triangular numbers.

Original entry on oeis.org

1, 0, 0, 0, 2, 0, 0, 2, 0, 2, 0, 2, 0, 2, 0, 0, 4, 0, 2, 0, 24, 2, 2, 0, 2, 26, 0, 2, 0, 26, 0, 28, 24, 0, 26, 24, 2, 2, 50, 2, 48, 0, 26, 26, 0, 48, 28, 72, 2, 26, 48, 4, 48, 48, 24, 74, 770, 2, 50, 48, 50, 26, 72, 720, 98, 74, 26, 74, 48, 770, 74, 768, 26, 122, 792, 72
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 05 2020

Keywords

Examples

			a(20) = 24 because we have [10, 6, 3, 1] (24 permutations).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, irem(1+p, 2)*p!, (t->
         `if`(t>n, 0, b(n, i+1, p)+b(n-t, i+1, p+1)))(i*(i+1)/2))
        end:
    a:= n-> b(n, 1, 0):
    seq(a(n), n=0..100);  # Alois P. Heinz, Dec 05 2020
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, Mod[1 + p, 2]*p!, With[{t = i(i+1)/2}, If[t > n, 0, b[n, i + 1, p] + b[n - t, 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 *)

A339442 Number of compositions (ordered partitions) of n into an odd number of distinct triangular numbers.

Original entry on oeis.org

0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 7, 0, 0, 0, 6, 1, 0, 6, 0, 12, 0, 1, 6, 0, 6, 6, 6, 0, 13, 0, 6, 6, 12, 0, 6, 126, 1, 18, 0, 12, 6, 126, 6, 6, 12, 7, 132, 6, 120, 18, 126, 0, 24, 246, 12, 127, 126, 126, 12, 132, 126, 138, 126, 132, 12, 246, 133, 138, 366, 6, 258, 252
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 05 2020

Keywords

Examples

			a(19) = 12 because we have [15, 3, 1] (6 permutations) and [10, 6, 3] (6 permutations).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, irem(p, 2)*p!, (t->
         `if`(t>n, 0, b(n, i+1, p)+b(n-t, i+1, p+1)))(i*(i+1)/2))
        end:
    a:= n-> b(n, 1, 0):
    seq(a(n), n=0..100);  # Alois P. Heinz, Dec 05 2020
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, Mod[p, 2]*p!, With[{t = i(i+1)/2}, If[t > n, 0, b[n, i + 1, p] + b[n - t, 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 *)

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

Original entry on oeis.org

1, 1, 0, 0, 1, 2, 0, 0, 0, 0, 1, 2, 0, 0, 2, 6, 0, 0, 0, 1, 2, 0, 0, 2, 6, 0, 0, 0, 0, 2, 6, 1, 2, 6, 24, 2, 6, 0, 0, 0, 0, 2, 6, 0, 0, 6, 25, 2, 0, 0, 4, 12, 0, 0, 6, 24, 2, 6, 0, 0, 12, 48, 0, 0, 25, 124, 6, 0, 2, 12, 24, 0, 0, 0, 2, 12, 24, 2, 12, 48, 120, 6, 24, 2, 6, 1, 2, 12
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 04 2020

Keywords

Examples

			a(15) = 6 because we have [10, 4, 1], [10, 1, 4], [4, 10, 1], [4, 1, 10], [1, 10, 4] and [1, 4, 10].
		

Crossrefs

Previous Showing 11-13 of 13 results.