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-10 of 16 results. Next

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

A337451 Number of relatively prime strict compositions of n with no 1's.

Original entry on oeis.org

0, 0, 0, 0, 0, 2, 0, 4, 2, 10, 8, 20, 14, 34, 52, 72, 90, 146, 172, 244, 390, 502, 680, 956, 1218, 1686, 2104, 3436, 4078, 5786, 7200, 10108, 12626, 17346, 20876, 32836, 38686, 53674, 67144, 91528, 113426, 152810, 189124, 245884, 343350, 428494, 552548, 719156
Offset: 0

Views

Author

Gus Wiseman, Aug 31 2020

Keywords

Comments

A strict composition of n is a finite sequence of distinct positive integers summing to n.

Examples

			The a(5) = 2 through a(10) = 8 compositions (empty column indicated by dot):
  (2,3)  .  (2,5)  (3,5)  (2,7)    (3,7)
  (3,2)     (3,4)  (5,3)  (4,5)    (7,3)
            (4,3)         (5,4)    (2,3,5)
            (5,2)         (7,2)    (2,5,3)
                          (2,3,4)  (3,2,5)
                          (2,4,3)  (3,5,2)
                          (3,2,4)  (5,2,3)
                          (3,4,2)  (5,3,2)
                          (4,2,3)
                          (4,3,2)
		

Crossrefs

A032022 does not require relative primality.
A302698 is the unordered non-strict version.
A332004 is the version allowing 1's.
A337450 is the non-strict version.
A337452 is the unordered version.
A000837 counts relatively prime partitions.
A032020 counts strict compositions.
A078374 counts strict relatively prime partitions.
A002865 counts partitions with no 1's.
A212804 counts compositions with no 1's.
A291166 appears to rank relatively prime compositions.
A337462 counts pairwise coprime compositions.
A337561 counts strict pairwise coprime compositions.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@#&&!MemberQ[#,1]&&GCD@@#==1&]],{n,0,15}]

A339101 Number of compositions (ordered partitions) of n into distinct parts >= 3.

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 1, 3, 3, 5, 5, 7, 13, 15, 21, 29, 35, 43, 79, 87, 123, 161, 221, 259, 349, 531, 645, 857, 1115, 1471, 1903, 2403, 2979, 4493, 5357, 7135, 9013, 11919, 14925, 19685, 23939, 30667, 42679, 52215, 67035, 86009, 109541, 137923, 177493, 222027, 277749
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 23 2020

Keywords

Examples

			a(7) = 3 because we have [7], [4, 3] and [3, 4].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember;
          `if`(n=0, p!, `if`((i-2)*(i+3)/2 b(n$2, 0):
    seq(a(n), n=0..50);  # Alois P. Heinz, Nov 23 2020
  • Mathematica
    nmax = 50; CoefficientList[Series[Sum[k! x^(k (k + 5)/2)/Product[1 - x^j, {j, 1, k}], {k, 0, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Sum_{k>=0} k! * x^(k*(k + 5)/2) / Product_{j=1..k} (1 - x^j).

A339163 Number of compositions (ordered partitions) of n into distinct parts, the least being 2.

Original entry on oeis.org

0, 0, 1, 0, 0, 2, 2, 2, 2, 8, 8, 14, 14, 20, 44, 50, 74, 104, 128, 158, 326, 356, 524, 698, 986, 1160, 1592, 2606, 3158, 4316, 5708, 7706, 10082, 12920, 16136, 25718, 30614, 41756, 53396, 71978, 91058, 122144, 149384, 193670, 279614, 342860, 447764, 581234
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 25 2020

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember;
          `if`(n=0, p!, `if`((i-2)*(i+3)/2 `if`(n<2, 0, b(n-2$2, 1)):
    seq(a(n), n=0..55);  # Alois P. Heinz, Nov 25 2020
  • Mathematica
    nmax = 47; CoefficientList[Series[Sum[k! x^(k (k + 3)/2)/Product[1 - x^j, {j, 1, k - 1}], {k, 1, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Sum_{k>=1} k! * x^(k*(k + 3)/2) / Product_{j=1..k-1} (1 - x^j).

A331845 Number of compositions (ordered partitions) of n into distinct cubes.

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, 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, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 2, 6, 0, 0, 0, 0, 0, 0, 6, 24
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 29 2020

Keywords

Examples

			a(36) = 6 because we have [27,8,1], [27,1,8], [8,27,1], [8,1,27], [1,27,8] and [1,8,27].
		

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, iroot(n, 3), 0):
    seq(a(n), n=0..100);  # Alois P. Heinz, Jan 30 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, Floor[n^(1/3)], 0];
    a /@ Range[0, 100] (* Jean-François Alcover, Oct 31 2020, after Alois P. Heinz *)

A339102 Number of compositions (ordered partitions) of n into distinct parts >= 4.

Original entry on oeis.org

1, 0, 0, 0, 1, 1, 1, 1, 1, 3, 3, 5, 5, 7, 7, 15, 15, 23, 29, 37, 43, 57, 87, 101, 137, 175, 235, 279, 363, 431, 665, 757, 1015, 1257, 1683, 2069, 2645, 3199, 4063, 5607, 6759, 8591, 10877, 13837, 17251, 22185, 26871, 33773, 41273, 56047, 66499, 85647, 104811
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 23 2020

Keywords

Examples

			a(9) = 3 because we have [9], [5, 4] and [4, 5].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember;
          `if`(n=0, p!, `if`((i-3)*(i+4)/2 b(n$2, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, Nov 23 2020
  • Mathematica
    nmax = 52; CoefficientList[Series[Sum[k! x^(k (k + 7)/2)/Product[1 - x^j, {j, 1, k}], {k, 0, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Sum_{k>=0} k! * x^(k*(k + 7)/2) / Product_{j=1..k} (1 - x^j).

A339103 Number of compositions (ordered partitions) of n into distinct parts >= 5.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 3, 5, 5, 7, 7, 9, 15, 17, 23, 31, 37, 45, 57, 65, 101, 115, 151, 189, 255, 293, 383, 451, 565, 777, 921, 1157, 1469, 1855, 2311, 2865, 3495, 4313, 5231, 7063, 8269, 10509, 12849, 16217, 19829, 25171, 30031, 37485, 45183
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 23 2020

Keywords

Examples

			a(11) = 3 because we have [11], [6, 5] and [5, 6].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember;
          `if`(n=0, p!, `if`((i-4)*(i+5)/2 b(n$2, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, Nov 23 2020
  • Mathematica
    nmax = 54; CoefficientList[Series[Sum[k! x^(k (k + 9)/2)/Product[1 - x^j, {j, 1, k}], {k, 0, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Sum_{k>=0} k! * x^(k*(k + 9)/2) / Product_{j=1..k} (1 - x^j).

A339104 Number of compositions (ordered partitions) of n into distinct parts >= 6.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 17, 17, 25, 31, 39, 45, 59, 65, 79, 115, 129, 165, 209, 269, 313, 403, 471, 585, 683, 941, 1063, 1375, 1641, 2097, 2537, 3161, 3745, 4663, 5535, 6741, 8627, 10241, 12535, 15307, 18849, 22869, 28409
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 23 2020

Keywords

Examples

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

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember;
          `if`(n=0, p!, `if`((i-5)*(i+6)/2 b(n$2, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, Nov 23 2020
  • Mathematica
    nmax = 57; CoefficientList[Series[Sum[k! x^(k (k + 11)/2)/Product[1 - x^j, {j, 1, k}], {k, 0, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Sum_{k>=0} k! * x^(k*(k + 11)/2) / Product_{j=1..k} (1 - x^j).

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

Showing 1-10 of 16 results. Next