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 31-40 of 54 results. Next

A218698 Number T(n,k) of ways to divide the partitions of n into nonempty consecutive subsequences each of which contains only equal parts and parts from distinct subsequences differ by at least k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 1, 1, 3, 2, 2, 6, 3, 2, 2, 14, 5, 4, 3, 3, 27, 7, 4, 3, 2, 2, 60, 11, 8, 6, 5, 4, 4, 117, 15, 8, 6, 4, 3, 2, 2, 246, 22, 13, 9, 8, 6, 5, 4, 4, 490, 30, 15, 12, 8, 7, 5, 4, 3, 3, 1002, 42, 22, 14, 12, 9, 8, 6, 5, 4, 4, 1998, 56, 24, 16, 12, 10, 7, 6, 4, 3, 2, 2
Offset: 0

Views

Author

Alois P. Heinz, Nov 04 2012

Keywords

Comments

T(n,k) is defined for n,k >= 0. The triangle contains terms with k <= n. T(n,k) = T(n,n) = A000005(n) for k >= n. For k>0: T(n,k) = number of partitions of n in which any two distinct parts differ by at least k, or, equivalently, T(n,k) = number of partitions of n in which each part, with the possible exception of the largest, occurs at least k times.

Examples

			T(4,0) = 14: [[1],[1],[1],[1]], [[1,1],[1],[1]], [[1],[1,1],[1]], [[1,1,1],[1]], [[1],[1],[1,1]], [[1,1],[1,1]], [[1],[1,1,1]], [[1,1,1,1]], [[1],[1],[2]], [[1,1],[2]], [[2],[2]], [[2,2]], [[1],[3]], [[4]].
T(4,1) = 5: [[1,1,1,1]], [[1,1],[2]], [[2,2]], [[1],[3]], [[4]].
T(4,2) = 4: [[1,1,1,1]], [[2,2]], [[1],[3]], [[4]].
T(4,3) = T(4,4) = A000005(4) = 3: [[1,1,1,1]], [[2,2]], [[4]].
Triangle T(n,k) begins:
    1;
    1,  1;
    3,  2,  2;
    6,  3,  2,  2;
   14,  5,  4,  3,  3;
   27,  7,  4,  3,  2,  2;
   60, 11,  8,  6,  5,  4,  4;
  117, 15,  8,  6,  4,  3,  2,  2;
  ...
		

Crossrefs

Main diagonal gives: A000005.
T(2n,n) gives A319776.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
           b(n, i-1, k) +add(b(n-i*j, i-k, k), j=1..n/i)))
        end:
    T:= (n, k)-> b(n, n, k):
    seq(seq(T(n,k), k=0..n), n=0..12);
  • Mathematica
    b[n_, i_, k_] :=  b[n, i, k] =  If[n == 0, 1, If[i < 1, 0,  b[n, i - 1, k] + Sum[b[n - i*j, i - k, k], {j, 1, n/i}]]]; T[n_, k_] := b[n, n, k]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Dec 27 2013, translated from Maple *)

Formula

G.f. of column k: 1 + Sum_{j>=1} x^j/(1-x^j) * Product_{i=1..j-1} (1+x^(k*i)/(1-x^i)).

A336131 Number of ways to split an integer partition of n into contiguous subsequences all having different sums.

Original entry on oeis.org

1, 1, 2, 6, 9, 20, 44, 74, 123, 231, 441, 681, 1188, 1889, 3110, 5448, 8310, 13046
Offset: 0

Views

Author

Gus Wiseman, Jul 11 2020

Keywords

Examples

			The a(1) = 1 through a(4) = 9 splits:
  (1)  (2)    (3)        (4)
       (1,1)  (2,1)      (2,2)
              (1,1,1)    (3,1)
              (2),(1)    (2,1,1)
              (1),(1,1)  (3),(1)
              (1,1),(1)  (1,1,1,1)
                         (2,1),(1)
                         (1),(1,1,1)
                         (1,1,1),(1)
		

Crossrefs

The version with equal instead of different sums is A317715.
Starting with a composition gives A336127.
Starting with a strict composition gives A336128.
Starting with a strict partition gives A336132.
Partitions of partitions are A001970.
Partitions of compositions are A075900.
Compositions of compositions are A133494.
Compositions of partitions are A323583.

Programs

  • Mathematica
    splits[dom_]:=Append[Join@@Table[Prepend[#,Take[dom,i]]&/@splits[Drop[dom,i]],{i,Length[dom]-1}],{dom}];
    Table[Sum[Length[Select[splits[ctn],UnsameQ@@Total/@#&]],{ctn,IntegerPartitions[n]}],{n,0,10}]

A336134 Number of ways to split an integer partition of n into contiguous subsequences with strictly increasing sums.

Original entry on oeis.org

1, 1, 2, 4, 6, 11, 17, 27, 37, 62, 82, 125, 168, 246, 320, 462, 585, 839, 1078, 1466, 1830, 2528, 3136, 4188, 5210, 6907, 8498, 11177, 13570, 17668, 21614, 27580, 33339, 42817, 51469, 65083, 78457, 98409, 117602, 147106, 174663, 217400, 259318, 319076, 377707
Offset: 0

Views

Author

Gus Wiseman, Jul 11 2020

Keywords

Examples

			The a(1) = 1 through a(6) = 17 splits:
  (1)  (2)    (3)        (4)          (5)            (6)
       (1,1)  (2,1)      (2,2)        (3,2)          (3,3)
              (1,1,1)    (3,1)        (4,1)          (4,2)
              (1),(1,1)  (2,1,1)      (2,2,1)        (5,1)
                         (1,1,1,1)    (3,1,1)        (2,2,2)
                         (1),(1,1,1)  (2,1,1,1)      (3,2,1)
                                      (2),(2,1)      (4,1,1)
                                      (1,1,1,1,1)    (2,2,1,1)
                                      (2),(1,1,1)    (2),(2,2)
                                      (1),(1,1,1,1)  (3,1,1,1)
                                      (1,1),(1,1,1)  (2,1,1,1,1)
                                                     (2),(2,1,1)
                                                     (1,1,1,1,1,1)
                                                     (2),(1,1,1,1)
                                                     (1),(1,1,1,1,1)
                                                     (1,1),(1,1,1,1)
                                                     (1),(1,1),(1,1,1)
		

Crossrefs

The version with equal sums is A317715.
The version with strictly decreasing sums is A336135.
The version with weakly decreasing sums is A316245.
The version with different sums is A336131.
Starting with a composition gives A304961.
Starting with a strict partition gives A336133.
Partitions of partitions are A001970.
Partitions of compositions are A075900.
Compositions of compositions are A133494.
Compositions of partitions are A323583.

Programs

  • Mathematica
    splits[dom_]:=Append[Join@@Table[Prepend[#,Take[dom,i]]&/@splits[Drop[dom,i]],{i,Length[dom]-1}],{dom}];
    Table[Sum[Length[Select[splits[ctn],Less@@Total/@#&]],{ctn,IntegerPartitions[n]}],{n,0,10}]
  • PARI
    a(n)={my(recurse(r,m,s,t,f)=if(m==0, r==0, if(f && r > t && t >= s, self()(r,m,t+1,0,0)) + self()(r,m-1,s,t,0) + self()(r-m,min(m,r-m), s,t+m,1))); recurse(n,n,0,0,0)} \\ Andrew Howroyd, Jan 18 2024

Extensions

a(21) onwards from Andrew Howroyd, Jan 18 2024

A365044 Number of subsets of {1..n} whose greatest element cannot be written as a (strictly) positive linear combination of the others.

Original entry on oeis.org

1, 2, 3, 5, 9, 20, 43, 96, 207, 442, 925, 1913, 3911, 7947, 16061, 32350, 64995, 130384, 261271, 523194, 1047208, 2095459, 4192212, 8386044, 16774078, 33550622, 67104244, 134212163, 268428760, 536862900, 1073732255, 2147472267, 4294953778, 8589918612, 17179850312
Offset: 0

Views

Author

Gus Wiseman, Aug 26 2023

Keywords

Comments

Sets of this type may be called "positive combination-free".
Also subsets of {1..n} such that no element can be written as a (strictly) positive linear combination of the others.

Examples

			The subset S = {3,5,6,8} has 6 = 2*3 + 0*5 + 0*8 and 8 = 1*3 + 1*5 + 0*6 but neither of these is strictly positive, so S is counted under a(8).
The a(0) = 1 through a(5) = 20 subsets:
  {}  {}   {}   {}     {}         {}
      {1}  {1}  {1}    {1}        {1}
           {2}  {2}    {2}        {2}
                {3}    {3}        {3}
                {2,3}  {4}        {4}
                       {2,3}      {5}
                       {3,4}      {2,3}
                       {2,3,4}    {2,5}
                       {1,2,3,4}  {3,4}
                                  {3,5}
                                  {4,5}
                                  {2,3,4}
                                  {2,4,5}
                                  {3,4,5}
                                  {1,2,3,4}
                                  {1,2,3,5}
                                  {1,2,4,5}
                                  {1,3,4,5}
                                  {2,3,4,5}
                                  {1,2,3,4,5}
		

Crossrefs

The binary version is A007865, first differences A288728.
The binary complement is A093971, first differences A365070.
Without re-usable parts we have A151897, first differences A365071.
The nonnegative version is A326083, first differences A124506.
A subclass is A341507.
The nonnegative complement is A364914, first differences A365046.
The complement is counted by A365043, first differences A365042.
First differences are A365045.
A085489 and A364755 count subsets w/o the sum of two distinct elements.
A088809 and A364756 count subsets with the sum of two distinct elements.
A364350 counts combination-free strict partitions, complement A364839.
A364913 counts combination-full partitions.

Programs

  • Mathematica
    combp[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,1,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Select[Subsets[Range[n]],And@@Table[combp[Last[#],Union[Most[#]]]=={},{k,Length[#]}]&]],{n,0,10}]
  • Python
    from itertools import combinations
    from sympy.utilities.iterables import partitions
    def A365044(n):
        mlist = tuple({tuple(sorted(p.keys())) for p in partitions(m,k=m-1)} for m in range(1,n+1))
        return n+1+sum(1 for k in range(2,n+1) for w in combinations(range(1,n+1),k) if w[:-1] not in mlist[w[-1]-1]) # Chai Wah Wu, Nov 20 2023

Formula

a(n) = 2^n - A365043(n).

Extensions

a(15)-a(34) from Chai Wah Wu, Nov 20 2023

A133121 Triangle T(n,k) read by rows = number of partitions of n such that number of parts minus number of distinct parts is equal to k, k = 0..n-1.

Original entry on oeis.org

1, 1, 1, 2, 0, 1, 2, 2, 0, 1, 3, 2, 1, 0, 1, 4, 2, 3, 1, 0, 1, 5, 4, 2, 2, 1, 0, 1, 6, 6, 3, 3, 2, 1, 0, 1, 8, 7, 5, 4, 2, 2, 1, 0, 1, 10, 8, 10, 3, 5, 2, 2, 1, 0, 1, 12, 13, 8, 9, 4, 4, 2, 2, 1, 0, 1, 15, 15, 14, 10, 8, 5, 4, 2, 2, 1, 0, 1, 18, 21, 15, 16, 8, 9, 4, 4, 2, 2, 1, 0, 1, 22, 25, 23, 17, 17, 7, 10, 4, 4, 2, 2, 1, 0, 1
Offset: 1

Views

Author

Vladeta Jovovic, Sep 18 2007

Keywords

Examples

			1
1,1
2,0,1
2,2,0,1
3,2,1,0,1
4,2,3,1,0,1
5,4,2,2,1,0,1
6,6,3,3,2,1,0,1
8,7,5,4,2,2,1,0,1
10,8,10,3,5,2,2,1,0,1
12,13,8,9,4,4,2,2,1,0,1
15,15,14,10,8,5,4,2,2,1,0,1
18,21,15,16,8,9,4,4,2,2,1,0,1
From _Gus Wiseman_, Jan 23 2019: (Start)
It is possible to augment the triangle to cover the n = 0 and k = n cases, giving:
   1
   1  0
   1  1  0
   2  0  1  0
   2  2  0  1  0
   3  2  1  0  1  0
   4  2  3  1  0  1  0
   5  4  2  2  1  0  1  0
   6  6  3  3  2  1  0  1  0
   8  7  5  4  2  2  1  0  1  0
  10  8 10  3  5  2  2  1  0  1  0
  12 13  8  9  4  4  2  2  1  0  1  0
  15 15 14 10  8  5  4  2  2  1  0  1  0
  18 21 15 16  8  9  4  4  2  2  1  0  1  0
  22 25 23 17 17  7 10  4  4  2  2  1  0  1  0
  27 30 32 21 19 16  8  9  4  4  2  2  1  0  1  0
Row seven {5, 4, 2, 2, 1, 0, 1, 0} counts the following integer partitions (empty columns not shown).
  (7)    (322)   (2221)  (22111)  (211111)  (1111111)
  (43)   (331)   (4111)  (31111)
  (52)   (511)
  (61)   (3211)
  (421)
(End)
		

Crossrefs

Row sums are A000041. Row polynomials evaluated at -1 are A268498. Row polynomials evaluated at 2 are A006951.

Programs

  • Maple
    b:= proc(n, i) option remember; expand(`if`(n=0, 1, `if`(i<1, 0,
           add(x^`if`(j=0, 0, j-1)*b(n-i*j, i-1), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n-1))(b(n$2)):
    seq(T(n), n=1..16);  # Alois P. Heinz, Aug 21 2015
  • Mathematica
    b[n_, i_] := b[n, i] = Expand[If[n == 0, 1, If[i < 1, 0, Sum[x^If[j == 0, 0, j-1]*b[n - i*j, i - 1], {j, 0, n/i}]]]]; T[n_] := Function [p, Table[ Coefficient[p, x, i], {i, 0, n - 1}]][b[n, n]]; Table[T[n], {n, 1, 16}] // Flatten (* Jean-François Alcover, Jan 23 2016, after Alois P. Heinz *)
    Table[Length[Select[IntegerPartitions[n],Length[#]-Length[Union[#]]==k&]],{n,0,15},{k,0,n}] (* augmented version, Gus Wiseman, Jan 23 2019 *)
  • PARI
    partitm(n,m,nmin)={ local(resul,partj) ; if( n < 0 || m <0, return([;]) ; ) ; resul=matrix(0,m); if(m==0, return(resul); ) ; for(j=max(1,nmin),n\m, partj=partitm(n-j,m-1,j) ; for(r1=1,matsize(partj)[1], resul=concat(resul,concat([j],partj[r1,])) ; ) ; ) ; if(m==1 && n >= nmin, resul=concat(resul,[[n]]) ; ) ; return(resul) ; }
    partit(n)={ local(resul,partm,filr) ; if( n < 0, return([;]) ; ) ; resul=matrix(0,n) ; for(m=1,n, partm=partitm(n,m,1) ; filr=vector(n-m) ; for(r1=1,matsize(partm)[1], resul=concat( resul,concat(partm[r1,],filr) ) ; ) ; ) ; return(resul) ; }
    A133121row(n)={ local(p=partit(n),resul=vector(n),nprts,ndprts) ; for(r=1,matsize(p)[1], nprts=0 ; ndprts=0 ; for(c=1,n, if( p[r,c]==0, break, nprts++ ; if(c==1, ndprts++, if(p[r,c]!=p[r,c-1], ndprts++ ) ; ) ; ) ; ) ; k=nprts-ndprts; resul[k+1]++ ; ) ; return(resul) ; }
    A133121()={ for(n=1,20, arow=A133121row(n) ; for(k=1,n, print1(arow[k],",") ; ) ; ) ; }
    A133121() ; \\ R. J. Mathar, Sep 28 2007
    
  • PARI
    tabl(nn) = my(pl = prod(n=1, nn, 1+x^n/(1-y*x^n)) + O(x^nn)); for (k=1, nn-1, print(Vecrev(polcoeff(pl,k,x)))); \\ Michel Marcus, Aug 23 2015

Formula

G.f.: Product_{n>=1} 1 + x^n/(1-y*x^n).

Extensions

More terms from R. J. Mathar, Sep 28 2007

A268498 Expansion of Product_{k>=1} ((1 + 2*x^k) / (1 + x^k)).

Original entry on oeis.org

1, 1, 0, 3, -1, 3, 3, 3, 0, 4, 12, 0, 9, -3, 21, 12, 17, -3, 33, 0, 33, 36, 36, 27, 21, 52, 24, 90, 72, 99, 24, 138, 21, 207, 0, 261, 149, 267, 45, 333, 174, 339, 174, 345, 411, 654, 330, 456, 657, 535, 684, 483, 1233, 489, 1353, 882, 1803, 720, 1902, 756
Offset: 0

Views

Author

Vaclav Kotesovec, Feb 06 2016

Keywords

Comments

It appears that this sequence contains only finitely many nonpositive terms, namely at indices {2, 4, 8, 11, 13, 17, 19, 34}. - Gus Wiseman, Jan 23 2019

Crossrefs

Programs

  • Mathematica
    nmax = 100; CoefficientList[Series[Product[(1+2*x^k)/(1+x^k), {k, 1, nmax}], {x, 0, nmax}], x]

Formula

a(n) ~ c^(1/4) * exp(sqrt(c*n)) / (2*sqrt(3*Pi)*n^(3/4)), where c = Pi^2/3 + 2*log(2)^2 + 4*polylog(2, -1/2) = 2.4571173338382709125... .
a(n) = Sum_{k = 0...n} (-1)^k * A133121(n,k). - Gus Wiseman, Jan 23 2019
G.f.: Product_{k>=1} (1 - Sum_{j>=1} (-1)^j * x^(k*j)). - Ilya Gutkovskiy, Nov 06 2019

A264686 Expansion of Product_{k>=1} (1 + 2*x^k)/(1 - x^k).

Original entry on oeis.org

1, 3, 6, 15, 27, 51, 93, 159, 264, 432, 696, 1086, 1683, 2553, 3837, 5700, 8367, 12147, 17505, 24972, 35361, 49728, 69402, 96243, 132657, 181782, 247692, 335838, 453042, 608289, 813102, 1082256, 1434519, 1894215, 2491644, 3265869, 4265973, 5553771, 7207167
Offset: 0

Views

Author

Vaclav Kotesovec, Nov 21 2015

Keywords

Comments

Convolution of A000041 and A032302.

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(i*(i+1)/2n, 0, 2*b(n-i, i-1))))
        end:
    a:= n-> add(b(i$2)*combinat[numbpart](n-i), i=0..n):
    seq(a(n), n=0..60);  # Alois P. Heinz, Dec 22 2017
  • Mathematica
    nmax = 40; CoefficientList[Series[Product[(1 + 2*x^k)/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x]
  • PARI
    { my(n=40); Vec(prod(k=1, n, 3/(1-x^k) - 2 + O(x*x^n))) } \\ Andrew Howroyd, Dec 22 2017

Formula

a(n) ~ sqrt(c) * exp(sqrt(2*c*n)) / (4*Pi*sqrt(3)*n), where c = 2*Pi^2/3 + log(2)^2 + 2*polylog(2, -1/2) = 6.163360867463814765670634381079217086937812673723341... . - Vaclav Kotesovec, Jan 04 2016

A323582 Number of generalized Young tableaux with constant rows, weakly increasing columns, and entries summing to n.

Original entry on oeis.org

1, 1, 3, 5, 11, 16, 33, 47, 85, 126, 208, 299, 486, 685, 1050, 1496, 2221, 3097, 4523, 6239, 8901, 12219, 17093, 23202, 32120, 43200, 58899, 78761, 106210, 140786, 188192, 247689, 327965, 429183, 563592, 732730, 955851, 1235370, 1600205, 2057743, 2649254
Offset: 0

Views

Author

Gus Wiseman, Jan 19 2019

Keywords

Comments

For strictly increasing columns, see A100883.

Examples

			The a(5) = 16 tableaux:
  5   1 1 1 1 1
.
  1   2    1 1   1 1 1   1 1 1   1 1 1 1
  4   3    3     2       1 1     1
.
  1   1    1 1   1 1     1 1 1
  1   2    1     1 1     1
  3   2    2     1       1
.
  1   1 1
  1   1
  1   1
  2   1
.
  1
  1
  1
  1
  1
		

Crossrefs

Programs

  • Mathematica
    comps[q_]:=Table[Table[Take[q,{Total[Take[c,i-1]]+1,Total[Take[c,i]]}],{i,Length[c]}],{c,Join@@Permutations/@IntegerPartitions[Length[q]]}];
    Table[Sum[Length[Select[comps[ptn],And@@SameQ@@@#&&GreaterEqual@@Length/@#&]],{ptn,Sort/@IntegerPartitions[n]}],{n,10}]

Extensions

a(21)-a(40) from Seiichi Manyama, Aug 20 2020

A104575 Alternating sum of diagonals in A060177.

Original entry on oeis.org

1, -1, -2, -1, -1, 3, 1, 7, 4, 4, 4, 2, -9, -7, -7, -28, -17, -25, -15, -24, -11, -8, 34, 19, 53, 46, 108, 110, 106, 113, 122, 108, 75, 103, -16, -87, -107, -169, -329, -257, -574, -501, -676, -609, -749, -588, -808, -548, -521, -315, -240, 369, 485, 865, 1099, 1738, 2129, 2686, 3088, 3460, 4103, 4011, 4480, 3983
Offset: 0

Views

Author

Vladeta Jovovic, Apr 21 2005

Keywords

Comments

A090794(n) = (A000041(n)-a(n))/2. A092306(n) = (A000041(n)+a(n))/2.

Crossrefs

Convolution inverse of A006951.

Programs

  • Mathematica
    CoefficientList[Series[Product[(1-2x^k)/(1-x^k),{k,70}],{x,0,70}],x] (* Harvey P. Dale, Jan 21 2021 *)
  • PARI
    N=66; x='x+O('x^N); Vec(prod(k=1, N, 1-x^k/(1-x^k))) \\ Seiichi Manyama, Oct 05 2019

Formula

G.f.: Product_{i>0} (1 - 2*x^i)/(1 - x^i).
Euler transform of -A008965(n).

Extensions

a(0)=1 prepended by Seiichi Manyama, Oct 05 2019

A124678 Number of conjugacy classes in PSL_2(p), p = prime(n).

Original entry on oeis.org

3, 4, 5, 6, 8, 9, 11, 12, 14, 17, 18, 21, 23, 24, 26, 29, 32, 33, 36, 38, 39, 42, 44, 47, 51, 53, 54, 56, 57, 59, 66, 68, 71, 72, 77, 78, 81, 84, 86, 89, 92, 93, 98, 99, 101, 102, 108, 114, 116, 117, 119, 122, 123, 128, 131, 134, 137, 138, 141, 143, 144, 149, 156, 158
Offset: 1

Views

Author

N. J. A. Sloane, Dec 25 2006

Keywords

Comments

A great deal is known about the number of conjugacy classes in the classical linear groups. See for example Dornhoff, Section 38, or Green.

References

  • Dornhoff, Larry, Group representation theory. Part A: Ordinary representation theory. Marcel Dekker, Inc., New York, 1971.

Crossrefs

Programs

  • Magma
    [ NumberOfClasses(PSL(2,p)) : p in [2,3,5,7,11,13,17,19,23,29,31,37] ];

Formula

a(n) = (prime(n) + 5)/2 for all n > 1. - Robin Visser, Sep 24 2023

Extensions

More terms from Klaus Brockhaus, Dec 26 2006
Previous Showing 31-40 of 54 results. Next