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

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

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

Original entry on oeis.org

1, 0, 1, 2, 2, 6, 7, 14, 11, 42, 39, 70, 95, 142, 239, 378, 418, 624, 1106, 1200, 2250, 2836, 4166, 4902, 8021, 10410, 14961, 21268, 29477, 36714, 54172, 68358, 95071, 134946, 168035, 254190, 322335, 427338, 541054, 787264, 964969, 1340730, 1748094, 2311386
Offset: 0

Views

Author

Vaclav Kotesovec, Feb 06 2016

Keywords

Crossrefs

Programs

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

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

A327683 Expansion of Product_{k>0} (1+sqrt(1+4*x^k))/2.

Original entry on oeis.org

1, 1, 0, 4, -5, 17, -40, 144, -459, 1517, -5111, 17747, -62074, 219292, -782602, 2816664, -10205754, 37203230, -136360106, 502219652, -1857659296, 6897983144, -25704335380, 96090440940, -360265425619, 1354343161419, -5103948546609, 19278502980063, -72972099256954
Offset: 0

Views

Author

Seiichi Manyama, Sep 22 2019

Keywords

Crossrefs

Convolution inverse of A327682.

Programs

  • Maple
    N:= 40:
    P:= mul((1+sqrt(1+4*x^k))/2,k=1..N):
    S:= series(P,x,N+1):
    seq(coeff(S,x,j),j=0..N); # Robert Israel, Sep 22 2019
  • Mathematica
    nmax = 30; CoefficientList[Series[Product[(1+Sqrt[1+4*x^k])/2, {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Sep 22 2019 *)
  • PARI
    N=66; x='x+O('x^N); Vec(prod(k=1, N, (1+sqrt(1+4*x^k))/2))
    
  • PARI
    N=66; x='x+O('x^N); Vec(prod(i=1, N, 1-sum(j=1, N\i, (-1)^j*binomial(2*j-2, j-1)*x^(i*j)/j)))

Formula

a(n) ~ -(-1)^n * c * 2^(2*n - 1) / (sqrt(Pi) * n^(3/2)), where c = Product_{k>=1} (1 + sqrt(1 + 4*(-1/4)^k))/2 = 0.52271977595412566689522667777276363119313248923... - Vaclav Kotesovec, May 06 2021

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

Original entry on oeis.org

1, 2, 0, 8, -2, 8, 16, 8, 8, 10, 80, -8, 72, -24, 144, 128, 134, 40, 224, 120, 232, 688, 176, 696, 32, 1194, -96, 1840, 1144, 2248, 288, 2968, 800, 4160, 752, 5104, 6438, 4984, 5104, 5488, 10960, 4856, 14080, 3480, 24408, 15448, 26832, 7080, 42120, 11178
Offset: 0

Views

Author

Vaclav Kotesovec, Feb 06 2016

Keywords

Comments

In general, for m > 0, if g.f. = Product_{k>=1} ((1 + m*x^k) / (1 + x^k)) then a(n) ~ c^(1/4) * exp(sqrt(c*n)) / (2*sqrt((m+1)*Pi) * n^(3/4)), where c = Pi^2/3 + 2*log(m)^2 + 4*polylog(2, -1/m).

Crossrefs

Programs

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

Formula

a(n) ~ c^(1/4) * exp(sqrt(c*n)) / (4*sqrt(Pi)*n^(3/4)), where c = Pi^2/3 + 2*log(3)^2 + 4*polylog(2, -1/3) = 4.467633549370382939364... .

A327684 Expansion of Product_{k>0} (1 + x^k/(1 + x^k/(1 + x^k))).

Original entry on oeis.org

1, 1, 0, 4, -4, 11, -13, 39, -73, 144, -256, 559, -1116, 2188, -4317, 8804, -17591, 34992, -69815, 140097, -280416, 560077, -1119327, 2240719, -4482527, 8961129, -17920037, 35847885, -71699202, 143384383, -286760131, 573549105, -1147115913, 2294173485, -4588309651, 9176739373
Offset: 0

Views

Author

Seiichi Manyama, Sep 22 2019

Keywords

Crossrefs

Programs

  • Mathematica
    m = 35; CoefficientList[Series[Product[(1 + x^k/(1 + x^k/(1 + x^k))), {k, 1, m}], {x, 0, m}], x] (* Amiram Eldar, May 06 2021 *)
  • PARI
    N=66; x='x+O('x^N); Vec(prod(k=1, N, (1+3*x^k+x^(2*k))/(1+2*x^k)))

Formula

a(n) ~ -(-1)^n * c * 2^n, where c = 1/4 * Product_{k>=2} (1 + (-1/2)^k/(1 + (-1/2)^k/(1 + (-1/2)^k))) = 0.267077782295890034289082591596560646781284184591415208072736792505213482... - Vaclav Kotesovec, May 06 2021
Showing 1-6 of 6 results.