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.

User: Gregory L. Simay

Gregory L. Simay's wiki page.

Gregory L. Simay has authored 11 sequences. Here are the ten most recent ones:

A308654 The overpartition triangle: T(n,k) is the number of overpartitions of n with exactly k positive integer parts, 0 <= k <= n.

Original entry on oeis.org

1, 0, 2, 0, 2, 2, 0, 2, 4, 2, 0, 2, 6, 4, 2, 0, 2, 8, 8, 4, 2, 0, 2, 10, 14, 8, 4, 2, 0, 2, 12, 20, 16, 8, 4, 2, 0, 2, 14, 28, 26, 16, 8, 4, 2, 0, 2, 16, 38, 40, 28, 16, 8, 4, 2, 0, 2, 18, 48, 60, 46, 28, 16, 8, 4, 2, 0, 2, 20, 60, 84, 72, 48, 28, 16, 8, 4, 2
Offset: 0

Author

Gregory L. Simay, Jun 14 2019

Keywords

Comments

T(n,0) = A000007(n).
T(n,1) = A040000(n) for n > 0.
T(n,2) = A005843(n-1).
T(n,3) = 2*A007980(n-3).
T(n,4) = 2*A061866(n-1).
T(n,5) = 2*A091773(n-5).
Conjecture: T(n,k) = 2*(the associated Poincaré series). If T(n,1) were 1 for n>0, then T(n, k>1) would be a Poincaré series.

Examples

			T(5,3) = 8 and counts the overpartitions 3,1,1; 3',1,1; 3,1',1; 3',1',1; 2,2,1; 2',2,1; 2,2,1' and 2',2,1'.
T(16,5) = 404 = T(11,5) + 2*( T(11,4) + T(11,3) + T(11,2) + T(11,1)) = 72 + 2*(84 + 60 + 20 + 2) = 404.
T(16, 5) = T(15,4) + T(11,4) + T(10,4) + T(6,4) + T(5,4) = 248 + 84 + 60 + 8 + 4 = 404.
T(9,1) + T(8,2) + T(7,3) + T(6,4) + T(6,5)= 2 + 14 + 20 + 8 + 2 = 46 =A300415(10).
Triangle: T(n,k) begins:
  1;
  0, 2;
  0, 2,  2;
  0, 2,  4,  2;
  0, 2,  6,  4,  2;
  0, 2,  8,  8,  4,  2;
  0, 2, 10, 14,  8,  4,  2;
  0, 2, 12, 20, 16,  8,  4,  2;
  0, 2, 14, 28, 26, 16,  8,  4, 2;
  0, 2, 16, 38, 40, 28, 16,  8, 4, 2;
  0, 2, 18, 48, 60, 46, 28, 16, 8, 4, 2;
  ...
		

Crossrefs

Row sums give A015128.
Main diagonal T(n,n) gives A040000.

Programs

  • Maple
    b:= proc(n,i) option remember; `if`(n=0, 1, `if`(i<1, 0, add(
          expand(`if`(j>0, 2*x^j, 1)*b(n-i*j, i-1)), j=0..n/i)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2)):
    seq(T(n), n=0..14);  # Alois P. Heinz, Jun 15 2019
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, Sum[Expand[If[j > 0, 2*x^j, 1]*b[n - i*j, i - 1]], {j, 0, n/i}]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][ b[n, n]];
    T /@ Range[0, 14] // Flatten (* Jean-François Alcover, Dec 10 2019, after Alois P. Heinz *)

Formula

Sum_{k=0..n} T(n,k) = A015128(n), the number of overpartitions of n.
If k > n, T(n,k) = 0.
If n >= k > n/2, T(n,k) = 2*A015128(n-k).
Conjecture: T(n,k) = T(n-k, k) + 2*(T(n-k, k-1) + ... + T(n-k, 1)).
Conjecture: T(n,k) = T(n-1, k-1) + T(n-k, k-1) + T(n-k-1, k-1) + T(n-2k, k-1) + T(n-2k-1) + ...
Conjecture: T(n,1) + T(n-1,2) + ... + T(n-floor(n/2),floor(n/2)) = A300415(n+1).
T(n,2) = 2n - 2.
Conjecture: g.f. T(n,k) = 2*(1+x)(1+x^2)...(1+x^(k-1))/((1-x)...(1-x^k)).
Sum_{k=1..n} k * T(n,k) = A235792(n). - Alois P. Heinz, Jun 15 2019

A297120 Number of compositions derived from the overpartitions of n.

Original entry on oeis.org

1, 2, 5, 14, 36, 92, 234, 586, 1452, 3562, 8674, 20956, 50290, 119922, 284308, 670458, 1573250, 3674700, 8546282, 19796234, 45681908, 105041402, 240723618, 549919604, 1252492674, 2844551866, 6442833156, 14555300218, 32801922154, 73749649900, 165443000338
Offset: 0

Author

Gregory L. Simay, Dec 25 2017

Keywords

Comments

Start by enumerating the overpartitions of n, then allow the parts to vary their arrangements.

Examples

			The A015128(4) = 14 overpartitions of 4 are: 4; 4'; 3,1; 3,1'; 3'1; 3',1', 2,2; 2',2; 2,1,1; 2,1',1; 2',1,1; 2',1',1; 1,1,1,1; and 1',1,1,1.  The corresponding 36 compositions are 4; 4'; 3,1; 1,3; 3,1'; 1',3; 3',1; 1,3'; 3',1'; 1',3'; 2,2; 2,2'; 2',2; 2,1,1; 1,2,1; 1,1,2; 2,1,1'; 2,1',1; 1,2,1'; 1,1',2'; 1',1,2; 1',2,1; 2',1,1; 1,2',2; 1,1,2'; 2',1,1'; 2',1',1; 1,2',1'; 1,1',2'; 1',2',1; 1',1,2'; 1,1,1,1; 1,1,1,1'; 1,1,1',1; 1,1',1,1; and 1',1,1,1. Note: For a sequence of like parts p,p,...p, an overcomposition of n will only recognize p,p...p and p',p...,p; the p' is not allowed to be other than the initial p term.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0 or i=1, (p+n)!*
          (1+n)/n!, add(b(n-i*j, i-1, p+j)*(1+j)/j!, j=0..n/i))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..35);  # Alois P. Heinz, Dec 26 2017
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0 || i == 1, (p + n)!*(n + 1)/n!, Sum[b[n - i*j, i - 1, p + j]*(j + 1)/j!, {j, 0, n/i}]];
    a[n_] := b[n, n, 0];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Dec 27 2017, after Alois P. Heinz *)
  • PARI
    {my(n=30); apply(p->subst(serlaplace(p), y, 1), Vec(prod(k=1, n, (1+y*x^k)*exp(y*x^k + O(x*x^n)))))} \\ Andrew Howroyd, Dec 26 2017
    
  • Python
    from sympy.core.cache import cacheit
    from sympy import factorial
    @cacheit
    def b(n, i, p):  return factorial(p + n)*(n + 1)//factorial(n) if n==0 or i==1 else sum(b(n - i*j, i - 1, p + j)*(j + 1)//factorial(j) for j in range(n//i + 1))
    def a(n): return b(n, n, 0)
    print([a(n) for n in range(41)]) # Indranil Ghosh, Dec 29 2017, after Maple code

Extensions

More terms from Alois P. Heinz, Dec 26 2017

A289249 Number of compositions of n if only the order of parts 1 and 2 matters.

Original entry on oeis.org

1, 1, 2, 4, 7, 12, 21, 35, 59, 98, 162, 266, 437, 713, 1163, 1893, 3077, 4995, 8105, 13139, 21293, 34492, 55858, 90438, 146406, 236974, 383538, 620703, 1004471, 1625447, 2630249, 4256087, 6886804, 11143447, 18030911, 29175137, 47206975, 76383199, 123591458
Offset: 0

Author

Gregory L. Simay, Jun 29 2017

Keywords

Comments

If only the order of parts 1 and 2 matters, then the remaining parts can be frozen "[]" in a partition subsequence; e.g., a(15) would count the sequence 5,4,3,2,1 twice: [5,4,3]2,1 and [5,4,3]1,2. (Also see example.)

Examples

			For n=6, the 21 sequences counted are [6]; [5],1; [4],2; [3,3], [4],1,1; [3],2,1; [3],1,2; 2,2,2; [3],1,1,1; 2,2,1,1; 2,1,2,1; 1,2,2,1; 1,2,1,2; 1,1,2,2; 2,1,1,2; 2,1,1,1,1; 1,2,1,1,1; 1,1,2,1,1; 1,1,1,2,1; 1,1,1,1,2; and 1,1,1,1,1,1.
		

Crossrefs

Programs

  • Mathematica
    Table[PartitionsP[n] + Sum[Fibonacci[k] PartitionsP[n - 2 - k], {k, n - 2}], {n, 0, 50}] (* Indranil Ghosh, Jun 29 2017 *)
  • PARI
    a275388(n)=sum(k=1, n, fibonacci(k)*numbpart(n - k));
    a(n)=numbpart(n)+a275388(n - 2); \\ Indranil Ghosh, Jun 29 2017
    
  • Python
    from sympy import fibonacci, npartitions
    def a(n): return npartitions(n) + sum([fibonacci(k)*npartitions(n - 2 - k) for k in range(1, n - 1)])
    print([a(n) for n in range(51)]) # Indranil Ghosh, Jun 29 2017

Formula

a(n) = A000041(n) + A275388(n-2), the sum of the n-th partition number and the (n-2)th convolution of partition numbers with Fibonacci numbers. E.g., a(8) = 59 = A000041(8) + A275388(6) = 22 + 37 = 59.
a(n) = A275388(n+1) - A275388(n) - A275388(n-1) + A275388(n-2).
G.f.: (1/x)*(1-x)*(1-x^2)*(g.f. of A275388) =(1/x)*(1-x)*(1-x^2)*Sum_{k=1..n} A000045(k)*A000041(n-k).

Extensions

More terms from Indranil Ghosh, Jun 29 2017

A285981 Number of Carlitz compositions having at least two identical parts.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 3, 10, 20, 44, 67, 149, 277, 528, 959, 1673, 3107, 5572, 9992, 17801, 31647, 55379, 98445, 173288, 305355, 536709, 943353, 1655316, 2900221, 5088098, 8916905, 15624332, 27368888, 47935241, 83939143, 146974040, 257277523, 450432510, 788487147
Offset: 0

Author

Gregory L. Simay, Apr 29 2017

Keywords

Examples

			For n=7, there are a(7) = 10 Carlitz compositions with at least two identical parts: 1,5,1; 2,3,2; 3,1,3; 1,2,1,3; 1,2,3,1; 1,3,1,2; 1,3,2,1; 2,1,3,1; 3,1,2,1 and 1,2,1,2,1.
		

Crossrefs

Formula

a(n) = A003242(n) - A032020(n).

Extensions

More terms from Alois P. Heinz, Apr 29 2017

A276129 a(n) is the number of ordered ways to tile a strip of length n+2 with white tiles of odd lengths summing to length n and two red squares.

Original entry on oeis.org

1, 3, 6, 13, 27, 54, 106, 204, 387, 725, 1344, 2469, 4500, 8145, 14652, 26213, 46665, 82704, 145982, 256722, 449937, 786109, 1369494, 2379447, 4123944, 7130895, 12303714, 21186013, 36411399, 62466906, 106987282, 182946888, 312367887, 532587461, 906840060
Offset: 0

Author

Gregory L. Simay, Aug 21 2016

Keywords

Comments

a(n) is a specific case of b(r,n), the number of ordered ways to rearrange a tiling of length n + r, with odd(1,3,5...) white tiles summing to n and r red squares.
Define the following summation: b(0,r,n) = b(r,n); b(1,r,n) = b(r, n-2) + b(r, n-4) + b(r, n-6) + ..; b(s, r, n) = b(s-1, r, n-2) + b(s-1, r, n-4) + b(r-1, s, n-6) + ...
The number of compositions of n with exactly r even numbers is b(r, r, n-2r).
Except for the initial 1, this is the p-INVERT transform of (1,0,1,0,1,0,...) for p(S) = (1 - S)^3. See A291219. - Clark Kimberling, Sep 04 2017

Examples

			Let 1,3 be the lengths of the odd tiles summing to 3 and let r,r be the two odd squares. Then the resulting number of compositions is a(3) = 13. The 6 compositions are 3,r,r; r,3,r; r,r,3; 1,1,1,r,r; 1,1,r,r,1; 1,r,r,1,1; r,r,1,1,1; 1,1,r,1,r; 1,r,1,r,1; r,1,r,1,1; r,1,1,r,1; 1,r,1,1,r; r,1,1,1,r.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, m) option remember;
          `if`(n+m=0, 1, `if`(m>0, b(n, m-1), 0)+
          add(`if`(j::odd, b(n-j, m), 0), j=1..n))
        end:
    a:= n-> b(n, 2):
    seq(a(n), n=0..50);  # Alois P. Heinz, Aug 29 2016
  • Mathematica
    a[0] = 1; a[n_] := Sum[Binomial[n - 2*k + 2, 2]*Binomial[n - k - 1, k], {k, 0, (n - 1)/2}];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Dec 27 2017, after Andrew Howroyd *)
  • PARI
    a(n)={if(n<=0, n==0, sum(k=0, (n-1)\2, binomial(n-2*k+2, 2)*binomial(n-k-1, k)))} \\ Andrew Howroyd, Dec 26 2017

Formula

a(n) = Sum_{k=0..floor((n-1)/2)} binomial(n-2*k+2, 2)*binomial(n-k-1, k) for n > 0. - Andrew Howroyd, Dec 26 2017
b(0,0)=1. For n>=1, b(0,n) = b(0,0,n) = the n-th Fibonacci number, A000045(n).
b(1,0)=1. For n>=1, b(1,n) = A239342(n+1).
b(2,n) = a(n) = a(n-1) + a(n-2) + A239342(n+1) + A239342(n-1).
G.f. for b(2,n): ((1-x^2)/(1-x-x^2))^3.
G.f. for b(r,n): ((1-x^2)/(1-x-x^2))^(r+1).
b(1,1,n) = A029907(n+1).
b(r,n) = b(r, n-1) + b(r, n-2) + b(r-1, n) - b(r-1, n-2).
b(r,r,n) = b(r-1, r-1, n) + b(r, r, n-1) + b(r, r, n-2).
G.f. for b(r,r,n): (1-x^2)/((1-x-x^2)^(r+1)).

Extensions

More terms from Alois P. Heinz, Aug 29 2016

A275548 Number of compositions of n if only the order of the odd numbers matter.

Original entry on oeis.org

1, 1, 2, 3, 6, 9, 16, 25, 43, 68, 113, 181, 298, 479, 781, 1260, 2048, 3308, 5364, 8672, 14048, 22720, 36782, 59502, 96305, 155807, 252136, 407943, 660113, 1068056, 1728210, 2796266, 4524531, 7320797, 11845394, 19166191, 31011673, 50177864, 81189642, 131367506
Offset: 0

Author

Gregory L. Simay, Aug 01 2016

Keywords

Comments

The number of partitions of n = 2k with only even numbers is p(k) = A000041(k). The number of compositions of n with only odd numbers is F(n) = the n-th Fibonacci number = A000045(n). Enumerating a(n) is therefore a sum of products of partition numbers and Fibonacci numbers.

Examples

			The compositions enumerated by a(6) = 16 are (6),(5,1),(1,5),(4,2)=(2,4), (3,3), (4,1,1)=(1,4,1)=(1,1,4), (2,3,1)=(3,2,1)=(3,1,2), (2,1,3)=(1,2,3)=(1,3,2), (2,2,2), (3,1,1,1),(1,3,1,1),(1,1,3,1),(1,1,1,3), (2,2,1,1)=(2,1,2,1)=(2,1,1,2)=(1,2,1,2)=(1,1,2,2)=(1,2,2,1), (2,1,1,1,1)=(1,2,1,1,1)=(1,1,2,1,1)=(1,1,1,2,1)=(1,1,1,1,2), (1,1,1,1,1,1).
The compositions enumerated by a(5) = 9 are (5), (4,1)=(1,4), (3,2)=(2,3), (3,1,1), (1,3,1), (1,1,3), (2,2,1)=(2,1,2)=(1,2,2), (2,1,1,1)=(1,2,1,1)=(1,1,2,1)=(1,1,1,2), (1,1,1,1,1).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; (t-> `if`(n=0, p!,
          `if`(i<1, 0, add(b(n-i*j, i-1, p+`if`(t, j, 0))/
          `if`(t, j, 0)!, j=0..n/i))))(i::odd)
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..50);  # Alois P. Heinz, Aug 03 2016
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i < 1, 0, Sum[b[n - i*j, i - 1, p + If[#, j, 0]]/If[#, j, 0]!, {j, 0, n/i}]]]&[OddQ[i]];
    a[n_] := b[n, n, 0];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, May 21 2018, after Alois P. Heinz *)
    nmax = 40; CoefficientList[Series[1/(1 - x - x^2) * Product[1/(1 - x^(2*k)), {k, 2, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Jun 02 2018 *)

Formula

a(2k+1) = Sum_{j=0..k} p(j)*F(2k + 1 - 2j), where p(j) = A000041(j), the number of partitions of j, and F(j) = A000045(j), the j-th Fibonacci number.
a(2k) = p(k) + Sum_{j=0..(k-1)} p(j)*F(2k - 2j).
a(2k+1) = a(2k) + a(2k-1).
a(2k) = a(2k-1) + a(2k-2) + p(k) - p(k-1).
G.f.: 1/(1 - x - x^2) * Product_{n>=2} 1/(1 - x^(2*n)). - Peter Bala, Aug 03 2016 [corrected by Vaclav Kotesovec, Jun 02 2018]
a(n) ~ c * phi^n, where c = 1 / (sqrt(5) * QPochhammer[1/phi^2]) = 0.92890318501026782066... and phi = A001622 = (1 + sqrt(5))/2 is the golden ratio. - Vaclav Kotesovec, Jun 02 2018

A275592 Number of compositions of n if only the order of the even numbers matter.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 12, 16, 26, 35, 56, 74, 117, 154, 241, 317, 492, 645, 998, 1306, 2014, 2634, 4053, 5296, 8139, 10630, 16321, 21310, 32699, 42684, 65472, 85452, 131038, 171012, 262198, 342161, 524552, 684497, 1049300, 1369216, 2098849, 2738710, 4198011
Offset: 0

Author

Gregory L. Simay, Aug 02 2016

Keywords

Comments

The number of compositions of n = 2k with only even numbers is c(k) = A011782(k). The number of partitions of n with only odd numbers is the strict partition q(n) = A000009(n). Enumerating a(n) is therefore a sum of products of composition numbers and strict partition numbers. (See formulas.)

Examples

			The compositions enumerated by a(6) = 12 are (6), (5,1)=(1,5), (4,2), (2,4), (3,3), (4,1,1)=(1,4,1)=(1,1,4), (3,2,1)=(1,2,3)=(2,3,1)=(2,1,3)=(3,1,2)=(1,3,2), (2,2,2), (3,1,1,1)=(1,3,1,1)=(1,1,3,1)=(1,1,1,3), (2,2,1,1)=(2,1,2,1)=(2,1,1,2)=(1,2,1,2)=(1,1,2,2)=(1,2,2,1), (2,1,1,1,1)=(1,2,1,1,1)=(1,1,2,1,1,)=(1,1,1,2,1)=(1,1,1,1,2), (1,1,1,1,1,1).
The compositions enumerated by a(5) = 7 are (5), (4,1)=(1,4), (3,2)=(2,3), (3,1,1)=(1,3,1)=(1,1,3), (2,2,1)=(2,1,2)=(1,2,2), (2,1,1,1)=(1,2,1,1)=(1,1,2,1)=(1,1,1,2), (1,1,1,1,1).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; (t-> `if`(n=0, p!,
          `if`(i<1, 0, add(b(n-i*j, i-1, p+`if`(t, j, 0))/
          `if`(t, j, 0)!, j=0..n/i))))(i::even)
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..50);  # Alois P. Heinz, Aug 03 2016
  • Mathematica
    nmax = 40; CoefficientList[Series[(1 - x^2)/(1 - 2*x^2)*Product[(1 + x^k), {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Jun 02 2018 *)

Formula

a(2k+1) = Sum_{j=0..k} c(j)*q(2k+1-2j), where c(j) = A011782(j), the number of compositions of j, and q(j) = A000009(j), the number of strict partitions of j.
a(2k) = Sum_{j=0..k} c(j)*q(2k - 2j).
a(n) = 2*a(n-2) + q(n) - q(n-2).
G.f.: (1 - x^2)/(1 - 2*x^2) * Product_{n>=1} (1 + x^n). - Peter Bala, Aug 03 2016
a(n) ~ c * 2^(n/2), where c = (QPochhammer[-1, 1/sqrt(2)] + (-1)^n*QPochhammer[-1, -1/sqrt(2)])/8, c = 2.002012668882683075956932277149607919866122388... if n is even and c = 1.8471591618236152130512812517147483461076894... if n is odd. - Vaclav Kotesovec, Jun 02 2018

A274174 Number of compositions of n if all summand runs are kept together.

Original entry on oeis.org

1, 1, 2, 4, 7, 12, 22, 36, 60, 97, 162, 254, 406, 628, 974, 1514, 2305, 3492, 5254, 7842, 11598, 17292, 25294, 37090, 53866, 78113, 112224, 161092, 230788, 328352, 466040, 658846, 928132, 1302290, 1821770, 2537156, 3536445, 4897310, 6777806, 9341456, 12858960, 17625970, 24133832, 32910898, 44813228, 60922160, 82569722
Offset: 0

Author

Gregory L. Simay, Jun 12 2016

Keywords

Comments

a(n^2) is odd. - Gregory L. Simay, Jun 23 2019
Also the number of compositions of n avoiding the patterns (1,2,1) and (2,1,2). - Gus Wiseman, Jul 07 2020

Examples

			If the summand runs are blocked together, there are 22 compositions of a(6): 6; 5+1, 1+5, 4+2, 2+4, (3+3), 4+(1+1), (1+1)+4, 1+2+3, 1+3+2, 2+1+3, 2+3+1, 3+1+2, 3+2+1, (2+2+2), 3+(1+1+1), (1+1+1)+3, (2+2)+(1+1), (1+1)+(2+2), 2+(1+1+1+1), (1+1+1+1)+2, (1+1+1+1+1+1).
a(0)=1; a(1)= 1; a(4) = 7; a(9) = 97; a(16) = 2305; a(25) = 78113 and a(36) = 3536445. - _Gregory L. Simay_, Jun 23 2019
		

Crossrefs

The version for patterns is A001339.
The version for prime indices is A333175.
The complement (i.e., the matching version) is A335548.
Anti-run compositions are A003242.
(1,2,1)- and (2,1,2)-matching permutations of prime indices are A335462.
(1,2,1)-matching compositions are A335470.
(1,2,1)-avoiding compositions are A335471.
(2,1,2)-matching compositions are A335472.
(2,1,2)-avoiding compositions are A335473.

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, p!, `if`(i<1, 0,
           add(b(n-i*j, i-1, p+`if`(j=0, 0, 1)), j=0..n/i)))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..50);  # Alois P. Heinz, Jun 12 2016
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[Split[#]]==Length[Union[#]]&]],{n,0,10}] (* Gus Wiseman, Jul 07 2020 *)
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i < 1, 0,
        Sum[b[n - i*j, i - 1, p + If[j == 0, 0, 1]], {j, 0, n/i}]]];
    a[n_] := b[n, n, 0];
    Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jul 11 2021, after Alois P. Heinz *)

Formula

a(n) = Sum_{k>=0} k! * A116608(n,k). - Joerg Arndt, Jun 12 2016

Extensions

Terms a(9) and beyond from Joerg Arndt, Jun 12 2016

A265317 The number of partitions of 2n having segment structure symmetry.

Original entry on oeis.org

1, 1, 3, 5, 10, 17, 33, 53
Offset: 0

Author

Gregory L. Simay, Dec 06 2015

Keywords

Comments

Define a segmented partition a(n, k, ) to be a partition of n with exactly k parts, with s(j) parts t(j) identical to each other and distinct from all other parts. Note that n>=k, j<=k, 0<=s(j)<=k, s(1)t(1) + ... + s(j)t(j) = n and s(1) + ... + s(j) = k.
A partition of 2n has segment structure symmetry if there is at least one way it can be arranged into two consecutive sequences (no central summand), with each sequence exhibiting the same segment structure.
If the total number of parts is an odd number, then a partition of 2n cannot exhibit segment structure symmetry.
Every partition of n into exactly 2 parts has structure symmetry <1><1>.
Except for the case of partitions with a segment structure of <3,1>, every partition of n into exactly 4 parts has segment structure symmetry.
Except for the case of partitions with a segment structure of <5,1> or <3,1,1>, every partition of 2n into exactly 6 integers has segment structure symmetry.

Examples

			The partition 5,3,3,1,1,1 can be rearranged into two consecutive sequences (separated by a / for clarity) 1,1,5/3,3,1 which exhibits the segment structure symmetry <2,1><2,1>, and so counts as one of the 53 partitions of 14 exhibiting this symmetry.
The partitions of 14 with exactly 2 parts are 13,1; 12,2; 11,3; 10,4; 9,5; 8,6; and 7,7. All of them, including 7,7, exhibit segment structure symmetry in the form of <1><1>.
The partition 5,5,3,1 is an example of a partition of 14 with exactly 4 parts with segment structure <2,1,1>. This partition can be arranged into two consecutive sequences 5,3/5,1, which exhibits the segment structure symmetry, <1,1><1,1>.
The partition 3,3,3,2,2,1 is an example of a partition of 14 with exactly 6 parts with segment structure <3,2,1>. This partition can be arranged into two consecutive sequences 3,3,1/2,2,3, which exhibits the segment structure symmetry <2,1><2,1>.
		

Crossrefs

Cf. A000041.

A263982 Number of partitions of n with a palindromicity of 3.

Original entry on oeis.org

1, 1, 3, 4, 8, 10, 18, 22, 36, 44, 67, 81, 119, 142
Offset: 6

Author

Gregory L. Simay, Nov 01 2015

Keywords

Comments

A non-strict partition of n can be arranged into two consecutive sequences that are mirror images of each other, separated by a central sequence of k distinct summands, k>=0. Strict partitions (ref. A000009) only have the central sequence. In both cases, the palindromicity of the partition is k.
Palindromic partitions (ref. A025065) have palindromicity 0 (no central summand) or 1 (central summand). Non-palindromic partitions have palindromicities >=2.

Examples

			If considered unordered rather than a nonincreasing sequence, the partition 9,7,7,5,4,4,2,2,1,1,1 can be arranged as 7,4,2,1 [central sequence of 9,5,1] 1,2,4,7. Therefore the palindromicity of this particular partition is 3.
w(14,3) = w(11,2) + w(11,3) = A014153(4) + 10 = 26 + 10 = 36.
w(15,3) = w(2*8-1,3) = A014153(4) + A014153(3) + A014153(1) + A014153(0) = 26 + 14 + 3 + 1 = 44.
		

Crossrefs

Formula

p(n,k) = number of partitions of n with palindromicity k.
If k*(k+1)/2 <= p(n) < (k+1)*(k+2)/2, then p(n) = p(n,0) + .. + p(n,k)
Let q(n,k)= number of strict partitions of n (ref. A000009) with exactly k parts. Then p(n,k) = Sum_{j>=0} q(n-2j,k)*p(j), which affords another way to demonstrate that the convolution of q(2n-j) with p(j) equals p(2n).
p(2n,0) = p(n) and p(2n+1,0) = 0 (ref. A025065).
p(2n,1) = p(2n+1,1) = A000070(n-1), the first partial sum of A000041 (ref. A025065).
p(2n,2) = p(2n-1,2) = A014153(n-2), the second partial sum of A000041.
p(2n,3) = A014153(n-3) + A014153(n-5) + A014153(n-6) + A014153(n-8) + A014153(n-9) + A014153(n-11) + A014153(n-12) + ...
G.f. for p(2n,3): p(x)* x^3*(1+x+x^2+x^3)/(1-x)*(1-x^2)*(1-x^3) where p(x) is the g.f. for A000041.
p(2n-1,3) = A014153(n-4) + A014153(n-5) + A014153(n-7) + A014153(n-8) + A014153(n-10) + A014153(n-11) + A014153(n-13) + A014153(n-14) + ...
G.f. for p(2n-1,3): p(x)* x^3*(1+2x+x^2)/(1-x)*(1-x^2)*(1-x^3) where p(x) is the g.f. for A000041.
More generally, p(n,k>=3) = p(n-k,k-1) + p(n-2k, k-1) + p(n-3k,n-1) + ... for k>=3 = p(n-k, k-1) + p(n-k,k).