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 26 results. Next

A219107 Number of compositions (ordered partitions) of n into distinct prime parts.

Original entry on oeis.org

1, 0, 1, 1, 0, 3, 0, 3, 2, 2, 8, 1, 8, 3, 8, 8, 10, 25, 16, 9, 16, 38, 16, 61, 18, 62, 46, 66, 160, 91, 138, 99, 70, 122, 306, 126, 314, 151, 362, 278, 588, 901, 602, 303, 654, 1142, 888, 1759, 892, 1226, 950, 2160, 1230, 3379, 1444, 2372, 2100, 4644, 7416
Offset: 0

Views

Author

Alois P. Heinz, Nov 11 2012

Keywords

Comments

a(0) = 0 iff n in {1,4,6}.

Examples

			a(5) = 3: [2,3], [3,2], [5].
a(7) = 3: [2,5], [5,2], [7].
a(8) = 2: [3,5], [5,3].
a(9) = 2: [2,7], [7,2].
a(10) = 8: [2,3,5], [2,5,3], [3,2,5], [3,5,2], [5,2,3], [5,3,2], [3,7], [7,3].
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    b:= proc(n, i) b(n, i):=
          `if`(n=0, [1], `if`(i<1, [], zip((x, y)->x+y, b(n, i-1),
           [0, `if`(ithprime(i)>n, [], b(n-ithprime(i), i-1))[]], 0)))
        end:
    a:= proc(n) local l; l:= b(n, pi(n));
          a(n):= add(l[i]*(i-1)!, i=1..nops(l))
        end:
    seq(a(n), n=0..70);
    # second Maple program:
    s:= proc(n) option remember; `if`(n<1, 0, ithprime(n)+s(n-1)) end:
    b:= proc(n, i, t) option remember; `if`(s(i)`if`(p>n, 0, b(n-p, i-1, t+1)))(ithprime(i))+b(n, i-1, t)))
        end:
    a:= n-> b(n, numtheory[pi](n), 0):
    seq(a(n), n=0..70);  # Alois P. Heinz, Jan 30 2020
  • Mathematica
    zip = With[{m=Max[Length[#1], Length[#2]]}, PadRight[#1, m]+PadRight[#2, m] ]&;
    b[n_, i_] := b[n, i] = If[n==0, {1}, If[i<1, {}, b[n, i-1] ~zip~ Join[{0}, If[Prime[i] > n, {}, b[n - Prime[i], i-1]]], {0}]];
    a[n_] := Module[{l}, l = b[n, PrimePi[n]]; Sum[l[[i]]*(i-1)!, {i, 1, Length[l]}]];
    Table[a[n], {n, 0, 70}] (* Jean-François Alcover, Mar 24 2017, adapted from Maple *)

Formula

a(n) = Sum_{k=0..A024936(n)} A219180(n,k)*k!.

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

A218396 Number of compositions of n into distinct (nonzero) Fibonacci numbers.

Original entry on oeis.org

1, 1, 1, 3, 2, 3, 8, 2, 9, 8, 8, 32, 6, 9, 32, 8, 38, 30, 32, 150, 6, 33, 32, 32, 158, 30, 38, 174, 30, 176, 150, 150, 870, 24, 33, 152, 32, 182, 150, 158, 894, 30, 182, 174, 174, 1014, 144, 176, 990, 150, 1014, 864, 870, 5904, 24, 153, 152, 152, 902, 150, 182, 1014, 150, 1022, 894, 894, 6054, 144
Offset: 0

Views

Author

Joerg Arndt, Oct 28 2012

Keywords

Examples

			There are a(37)=182 such compositions of 37. Each of the 6 partitions of 37 into distinct Fibonacci numbers corresponds to m! compositions (where m is the number of parts):
  #:  partition      ( m! compositions)
  1:  1 2 5 8 21     (120 compositions)
  2:  1 2 13 21      ( 24 compositions)
  3:  1 2 34         (  6 compositions)
  4:  3 5 8 21       ( 24 compositions)
  5:  3 13 21        (  6 compositions)
  6:  3 34           (  2 compositions)
The number of compositions is 120 + 24 + 6 + 24 + 6 + 2 = 182.
		

Crossrefs

Cf. A032021 (compositions into distinct odd numbers).
Cf. A000119 (partitions into distinct nonzero Fibonacci numbers), A000700 (partitions into distinct odd numbers).
Cf. A076739 (compositions into Fibonacci numbers).

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

A337547 Number of compositions (ordered partitions) of n into distinct parts congruent to 1 mod 3.

Original entry on oeis.org

1, 1, 0, 0, 1, 2, 0, 1, 2, 0, 1, 4, 6, 1, 4, 6, 1, 6, 12, 1, 6, 18, 25, 8, 24, 25, 8, 30, 49, 10, 42, 73, 10, 48, 121, 132, 60, 145, 132, 72, 217, 254, 84, 265, 374, 96, 361, 616, 114, 433, 856, 846, 553, 1218, 864, 649, 1578, 1602, 817, 2180, 2340, 937, 2780, 3798, 1129, 3622
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 22 2020

Keywords

Examples

			a(12) = 6 because we have [7, 4, 1], [7, 1, 4], [4, 7, 1], [4, 1, 7], [1, 7, 4] and [1, 4, 7].
		

Crossrefs

Programs

  • Mathematica
    nmax = 65; CoefficientList[Series[Sum[k! x^(k (3 k - 1)/2)/Product[1 - x^(3 j), {j, 1, k}], {k, 0, nmax}], {x, 0, nmax}], x]

Formula

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

A337548 Number of compositions (ordered partitions) of n into distinct parts congruent to 2 mod 3.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 2, 1, 0, 2, 1, 0, 4, 1, 6, 4, 1, 6, 6, 1, 12, 6, 1, 18, 8, 25, 24, 8, 25, 30, 10, 49, 42, 10, 73, 48, 12, 121, 60, 132, 145, 72, 134, 217, 84, 254, 265, 96, 376, 361, 114, 616, 433, 126, 858, 553, 864, 1218, 649, 882, 1580, 817, 1620, 2180, 937
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 22 2020

Keywords

Examples

			a(15) = 6 because we have [8, 5, 2], [8, 2, 5], [5, 8, 2], [5, 2, 8], [2, 8, 5] and [2, 5, 8].
		

Crossrefs

Programs

  • Mathematica
    nmax = 65; CoefficientList[Series[Sum[k! x^(k (3 k + 1)/2)/Product[1 - x^(3 j), {j, 1, k}], {k, 0, nmax}], {x, 0, nmax}], x]

Formula

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

A339059 Number of compositions (ordered partitions) of n into distinct parts congruent to 1 mod 4.

Original entry on oeis.org

1, 1, 0, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 4, 6, 0, 1, 4, 6, 0, 1, 6, 12, 0, 1, 6, 18, 24, 1, 8, 24, 24, 1, 8, 30, 48, 1, 10, 42, 72, 1, 10, 48, 120, 121, 12, 60, 144, 121, 12, 72, 216, 241, 14, 84, 264, 361, 14, 96, 360, 601, 16, 114, 432, 841, 736, 126, 552, 1201, 738
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 22 2020

Keywords

Examples

			a(15) = 6 because we have [9, 5, 1], [9, 1, 5], [5, 9, 1], [5, 1, 9], [1, 9, 5] and [1, 5, 9].
		

Crossrefs

Programs

  • Mathematica
    nmax = 70; CoefficientList[Series[Sum[k! x^(k (2 k - 1))/Product[1 - x^(4 j), {j, 1, k}], {k, 0, nmax}], {x, 0, nmax}], x]

Formula

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

A339060 Number of compositions (ordered partitions) of n into distinct parts congruent to 3 mod 4.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 2, 1, 0, 0, 2, 1, 0, 0, 4, 1, 0, 6, 4, 1, 0, 6, 6, 1, 0, 12, 6, 1, 0, 18, 8, 1, 24, 24, 8, 1, 24, 30, 10, 1, 48, 42, 10, 1, 72, 48, 12, 1, 120, 60, 12, 121, 144, 72, 14, 121, 216, 84, 14, 241, 264, 96, 16, 361, 360, 114, 16, 601, 432, 126, 18, 841
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 22 2020

Keywords

Examples

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

Crossrefs

Programs

  • Mathematica
    nmax = 75; CoefficientList[Series[Sum[k! x^(k (2 k + 1))/Product[1 - x^(4 j), {j, 1, k}], {k, 0, nmax}], {x, 0, nmax}], x]

Formula

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

A079499 Total number of parts in all partitions of n into distinct odd parts.

Original entry on oeis.org

0, 1, 0, 1, 2, 1, 2, 1, 4, 4, 4, 4, 6, 7, 6, 10, 12, 13, 12, 16, 18, 22, 22, 25, 32, 36, 36, 42, 50, 53, 58, 64, 76, 83, 88, 99, 116, 123, 132, 147, 168, 181, 194, 215, 240, 262, 280, 306, 346, 375, 396, 437, 482, 521, 558, 610, 670, 724, 772, 840, 922, 993, 1056, 1151, 1256, 1348
Offset: 0

Views

Author

Arnold Knopfmacher, Jan 21 2003

Keywords

Comments

Also sum of the sizes of the Durfee squares of all self-conjugate partitions of n. Example: a(13)=7 because there are three self-conjugate partitions of 13, namely [7,1,1,1,1,1,1], [5,3,3,1,1] and [4,4,3,2], having Durfee squares of sizes 1,3 and 3, respectively. a(n) = Sum_{k=1..floor(sqrt(n))} k*A116422(n,k). - Emeric Deutsch, Feb 14 2006

Examples

			a(13)=7 because the partitions of 13 into distinct odd parts are [13], [9,3,1] and [7,5,1] and we have 1+3+3=7 parts.
		

References

  • G. E. Andrews, The Theory of Partitions, Addison-Wesley, 1976 (pp. 27-28).
  • G. E. Andrews and K. Eriksson, Integer Partitions, Cambridge Univ. Press, 2004 (pp. 75-78).

Crossrefs

Programs

  • Maple
    g:=sum(k*x^(k^2)/product(1-x^(2*i),i =1..k),k=1..20):gser:=series(g,x=0,52): seq(coeff(gser,x,n),n=0..50); # Emeric Deutsch, Feb 14 2006
  • Mathematica
    max = 100; s = Sum[ k*x^(k^2) / Product[1-x^(2*j), {j, 1, k}], {k, 1, Sqrt[max] // Ceiling}]; CoefficientList[ Series[s, {x, 0, max}], x] (* Jean-François Alcover, Feb 19 2015, after Vladeta Jovovic *)
  • PARI
    N=66;  S=2+sqrtint(N); x='x+O('x^N);
    gf=sum(n=0, S, n*x^(n^2)/prod(k=1,n, 1-x^(2*k)) );
    concat( [0], Vec(gf) )
    \\ Joerg Arndt, Feb 18 2014

Formula

G.f.: (Sum_{k>=1} x^(2*k-1)/(1 + x^(2*k-1))) * Product_{m>=1} (1 + x^(2m-1)).
G.f.: Sum_{k>=1} k*x^(k^2)/Product_{j=1..k} (1 - x^(2*j)). - Vladeta Jovovic, Aug 06 2004
a(n) ~ 3^(1/4) * log(2) * exp(Pi*sqrt(n/6)) / (Pi * 2^(5/4) * n^(1/4)). - Vaclav Kotesovec, May 20 2018
Showing 1-10 of 26 results. Next