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 10 results.

A008289 Triangle read by rows: Q(n,m) = number of partitions of n into m distinct parts, n>=1, m>=1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 1, 3, 2, 1, 4, 3, 1, 4, 4, 1, 1, 5, 5, 1, 1, 5, 7, 2, 1, 6, 8, 3, 1, 6, 10, 5, 1, 7, 12, 6, 1, 1, 7, 14, 9, 1, 1, 8, 16, 11, 2, 1, 8, 19, 15, 3, 1, 9, 21, 18, 5, 1, 9, 24, 23, 7, 1, 10, 27, 27, 10, 1, 1, 10, 30, 34, 13, 1, 1, 11, 33, 39, 18, 2, 1, 11, 37
Offset: 1

Views

Author

Keywords

Comments

Row n contains A003056(n) = floor((sqrt(8*n+1)-1)/2) terms (number of terms increases by one at each triangular number). - Michael Somos, Dec 04 2002
Row sums give A000009.
Q(n,m) is the number of partitions of n whose greatest part is m and every number in {1,2,...,m} occurs as a part at least once. - Geoffrey Critzer, Nov 17 2011

Examples

			Q(8,3) = 2 since 8 can be written in 2 ways as sum of 3 distinct positive integers: 5+2+1 and 4+3+1.
Triangle starts:
  1;
  1;
  1,  1;
  1,  1;
  1,  2;
  1,  2,  1;
  1,  3,  1;
  1,  3,  2;
  1,  4,  3;
  1,  4,  4,  1;
  1,  5,  5,  1;
  1,  5,  7,  2;
  1,  6,  8,  3;
  1,  6, 10,  5;
  1,  7, 12,  6,  1;
  1,  7, 14,  9,  1;
  1,  8, 16, 11,  2;
  1,  8, 19, 15,  3;
  1,  9, 21, 18,  5;
  1,  9, 24, 23,  7;
  1, 10, 27, 27, 10,  1;
  1, 10, 30, 34, 13,  1;
  1, 11, 33, 39, 18,  2;
  1, 11, 37, 47, 23,  3;
  1, 12, 40, 54, 30,  5;
  1, 12, 44, 64, 37,  7;
  1, 13, 48, 72, 47, 11;
  1, 13, 52, 84, 57, 14, 1;
  1, 14, 56, 94, 70, 20, 1; ...
Q(8,3) = 2 because there are 2 partitions of 8 in which  1, 2 and 3 occur as a part at least once: (3,2,2,1), (3,2,1,1,1). - _Geoffrey Critzer_, Nov 17 2011
		

References

  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 115.

Crossrefs

Sum of n-th row is A000009(n). Sum(Q(n,k)*k, k>=1) = A015723(n).
A060016 is another version.
Cf. A032020.

Programs

  • Maple
    g:=product(1+t*x^j,j=1..40): gser:=simplify(series(g,x=0,32)): P[0]:=1: for n from 1 to 30 do P[n]:=sort(coeff(gser,x^n)) od: for n from 1 to 25 do seq(coeff(P[n],t,j),j=1..floor((sqrt(8*n+1)-1)/2)) od; # yields sequence in triangular form; Emeric Deutsch, Feb 21 2006
    # second Maple program:
    b:= proc(n, i) b(n, i):= `if`(n=0, [1], `if`(i<1, [], zip((x, y)
          -> x+y, b(n, i-1), `if`(i>n, [], [0, b(n-i, i-1)[]]), 0)))
        end:
    T:= n-> subsop(1=NULL, b(n, n))[]:
    seq(T(n), n=1..40);  # Alois P. Heinz, Nov 18 2012
  • Mathematica
    q[n_, k_] := q[n, k] = If[n < k || k < 1, 0, If[n == 1, 1, q[n-k, k] + q[n-k, k-1]]]; Take[ Flatten[ Table[q[n, k], {n, 1, 24}, {k, 1, Floor[(Sqrt[8n+1] - 1)/2]}]], 91] (* Jean-François Alcover, Aug 01 2011, after PARI prog. *)
    (* As a triangular table: *)
    Table[Coefficient[Series[Product[1+t    x^i,{i,n}],{x,0,n}],x^n t^m],{n,24},{m,n}] (* Wouter Meeussen, Feb 22 2014 *)
    Table[Count[PowersRepresentations[n, k, 1], ?(Nor[MemberQ[#, 0], MemberQ[Differences@ #, 0]] &)], {n, 23}, {k, Floor[(Sqrt[8 n + 1] - 1)/2]}] // Flatten (* _Michael De Vlieger, Jul 12 2017 *)
    nrows = 24; d=Table[Select[IntegerPartitions[n], DeleteDuplicates[#] == # &],{n, nrows}] ;
    Flatten@Table[Table[Count[d[[n]], x_ /; Length[x] == m], {m, Floor[(Sqrt[8 n + 1] - 1)/2]}], {n, nrows}] (* Robert Price, Aug 17 2020 *)
  • PARI
    {Q(n, k) = if( k<0 || k>n,0, polcoeff( polcoeff( prod(i=1, n, 1 + y*x^i, 1 + x * O(x^n)), n), k))}; /* Michael Somos, Dec 04 2002 */
    
  • PARI
    Q(n,k)=if(nPaul D. Hanna
    
  • PARI
    {Q(n, k) = my(u); if( n<1 || k<1 || k>(sqrtint(8*n+1)-1)\2, 0, u = n - k *(k+1)/2; polcoeff( 1 / prod(i=1, k, 1 - x^i, 1 + x*O(x^u)), u))}; /* Michael Somos, Jul 11 2017 */
    
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A008289_T(n,k):
        if k<1 or nA008289_T(n-k,k)+A008289_T(n-k,k-1) # Chai Wah Wu, Sep 22 2023

Formula

G.f.: Product_{n>0} (1 + y*x^n) = 1 + Sum_{n>0, k>0} Q(n, k) * x^n * y^k. - Michael Somos, Dec 04 2002
Q(n, k) = Q(n-k, k) + Q(n-k, k-1) for n>k>=1, with Q(1, 1)=1, Q(n, 0)=0 (n>=1). - Paul D. Hanna, Mar 04 2005
G.f.: Sum_{n>0, k>0} x^n * y^(k*(k+1)/2) / Product_{i=1..k} (1 - y^i). - Michael Somos, Jul 11 2017
Sum_{k>=0} k! * Q(n,k) = A032020(n). - Alois P. Heinz, Feb 25 2020
Q(n, m) = A008284(n - m*(m-1)/2, m) = A026820(n - m*(m+1)/2, m), using for the latter, the extension A026820(n, k) = A026820(n, n) = A000041(n), for every k >= n >= 0. - Álvar Ibeas, Jul 23 2020

Extensions

Additional comments from Michael Somos, Dec 04 2002
Entry revised by N. J. A. Sloane, Nov 20 2006

A117147 Triangle read by rows: T(n,k) is the number of partitions of n with k parts in which no part occurs more than 3 times (n>=1, k>=1).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 3, 3, 2, 1, 3, 4, 3, 1, 1, 4, 5, 4, 2, 1, 4, 7, 6, 3, 1, 1, 5, 8, 9, 5, 1, 1, 5, 10, 11, 8, 3, 1, 6, 12, 14, 11, 5, 1, 1, 6, 14, 18, 15, 8, 2, 1, 7, 16, 23, 20, 11, 4, 1, 7, 19, 27, 27, 17, 6, 1, 1, 8, 21, 33, 34, 23, 10, 2, 1, 8, 24, 39, 43, 32, 15, 4, 1, 9
Offset: 1

Views

Author

Emeric Deutsch, Mar 07 2006

Keywords

Comments

Row n has floor(sqrt(6n+6)-3/2) terms. Row sums yield A001935. Sum(k*T(n,k),k>=0) = A117148(n).

Examples

			T(7,3) = 4 because we have [5,1,1], [4,2,1], [3,3,1] and [3,2,2].
Triangle starts:
1;
1, 1;
1, 1, 1;
1, 2, 1;
1, 2, 2, 1;
1, 3, 3, 2;
1, 3, 4, 3, 1;
		

Crossrefs

Programs

  • Maple
    g:=-1+product(1+t*x^j+t^2*x^(2*j)+t^3*x^(3*j),j=1..35): gser:=simplify(series(g,x=0,23)): for n from 1 to 18 do P[n]:=sort(coeff(gser,x^n)) od: for n from 1 to 18 do seq(coeff(P[n],t^j),j=1..floor(sqrt(6*n+6)-3/2)) od; # yields sequence in triangular form
    # second Maple program
    b:= proc(n, i) option remember; local j; if n=0 then 1
          elif i<1 then 0 else []; for j from 0 to min(3, n/i) do
          zip((x, y)->x+y, %, [0$j, b(n-i*j, i-1)], 0) od; %[] fi
        end:
    T:= n-> subsop(1=NULL, [b(n, n)])[]:
    seq(T(n), n=1..20);  # Alois P. Heinz, Jan 08 2013
  • Mathematica
    max = 18; g = -1+Product[1+t*x^j+t^2*x^(2j)+t^3*x^(3j), {j, 1, max}]; t[n_, k_] := SeriesCoefficient[g, {x, 0, n}, {t, 0, k}]; Table[DeleteCases[Table[t[n, k], {k, 1, n}], 0], {n, 1, max}] // Flatten (* Jean-François Alcover, Jan 08 2014 *)

Formula

G.f.: G(t,x) = -1+product(1+tx^j+t^2*x^(2j)+t^3*x^(3j), j=1..infinity).

A185350 Number of parts in all partitions of n in which no part occurs more than twice.

Original entry on oeis.org

0, 1, 3, 3, 8, 11, 17, 23, 36, 48, 69, 88, 125, 157, 212, 271, 356, 445, 574, 711, 906, 1118, 1400, 1711, 2125, 2583, 3171, 3828, 4666, 5604, 6777, 8095, 9730, 11567, 13815, 16357, 19429, 22910, 27077, 31801, 37432, 43802, 51338, 59871, 69914, 81273, 94562
Offset: 0

Views

Author

Alois P. Heinz, Jan 21 2013

Keywords

Examples

			a(6) = 17: [6], [5,1], [4,2], [3,3], [4,1,1], [3,2,1], [2,2,1,1].
a(7) = 23: [7], [6,1], [5,2], [4,3], [5,1,1], [4,2,1], [3,3,1], [3,2,2], [3,2,1,1].
		

Crossrefs

Column k=2 of A210485.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, [1, 0], `if`(i<1, [0, 0],
          add((l->[l[1], l[2]+l[1]*j])(b(n-i*j, i-1)), j=0..min(n/i, 2))))
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=0..50);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n==0, {1, 0}, If[i<1, {0, 0}, Sum[b[n - i j, i - 1, k] /. l_List :> {l[[1]], l[[2]] + l[[1]] j}, {j, 0, Min[n/i, k]} ] ] ];
    a[n_] := b[n, n, 2][[2]];
    a /@ Range[0, 50] (* Jean-François Alcover, Dec 10 2020, after Alois P. Heinz *)
    Table[Length[Flatten[Select[IntegerPartitions[n],Max[Length/@Split[#]]<3&]]],{n,0,50}] (* Harvey P. Dale, Jul 04 2023 *)

Formula

a(n) = Sum_{k>=0} k*A209318(n,k).
a(n) ~ log(3) * exp(2*Pi*sqrt(n)/3) / (2*Pi*n^(1/4)). - Vaclav Kotesovec, May 26 2018

A320592 Number of partitions of n with four parts in which no part occurs more than twice.

Original entry on oeis.org

1, 1, 3, 4, 6, 8, 12, 14, 19, 23, 29, 34, 42, 48, 58, 66, 77, 87, 101, 112, 128, 142, 160, 176, 197, 215, 239, 260, 286, 310, 340, 366, 399, 429, 465, 498, 538, 574, 618, 658, 705, 749, 801, 848, 904, 956, 1016, 1072, 1137, 1197, 1267, 1332, 1406, 1476, 1556
Offset: 6

Views

Author

Alois P. Heinz, Oct 16 2018

Keywords

Crossrefs

Column k=4 of A209318.

Formula

G.f.: -(x^4-x^2-1)*x^6/((x^2+1)*(x^2+x+1)*(x+1)^2*(x-1)^4).

A320593 Number of partitions of n with five parts in which no part occurs more than twice.

Original entry on oeis.org

1, 2, 3, 5, 8, 11, 16, 21, 28, 36, 46, 57, 71, 86, 104, 124, 148, 173, 203, 235, 272, 312, 357, 405, 460, 518, 583, 652, 729, 810, 900, 995, 1099, 1209, 1329, 1455, 1593, 1737, 1893, 2057, 2234, 2419, 2618, 2826, 3049, 3282, 3531, 3790, 4067, 4355, 4661, 4980
Offset: 9

Views

Author

Alois P. Heinz, Oct 16 2018

Keywords

Crossrefs

Column k=5 of A209318.

Formula

G.f.: (x^5-x-1)*x^9/((x^2+x+1)*(x^4+x^3+x^2+x+1)*(x^2+1)*(x+1)^2*(x-1)^5).

A320594 Number of partitions of n with six parts in which no part occurs more than twice.

Original entry on oeis.org

1, 1, 3, 5, 8, 11, 18, 23, 33, 44, 58, 73, 96, 117, 148, 181, 221, 264, 321, 377, 449, 526, 616, 712, 830, 949, 1093, 1246, 1420, 1605, 1822, 2044, 2302, 2575, 2880, 3202, 3569, 3947, 4375, 4826, 5322, 5844, 6427, 7029, 7698, 8400, 9164, 9965, 10846, 11757
Offset: 12

Views

Author

Alois P. Heinz, Oct 16 2018

Keywords

Crossrefs

Column k=6 of A209318.

Programs

  • Mathematica
    LinearRecurrence[{1,1,0,0,-1,0,-2,0,1,1,1,1,0,-2,0,-1,0,0,1,1,-1},{1,1,3,5,8,11,18,23,33,44,58,73,96,117,148,181,221,264,321,377,449},50] (* Harvey P. Dale, Dec 19 2022 *)

Formula

G.f.: (x^9-x^8-x^7-x^5+x^3+x^2+1)*x^12 / ((x^2-x+1) *(x^4+x^3+x^2+x+1) *(x^2+1) *(x^2+x+1)^2 *(x+1)^3 *(x-1)^6).

A320595 Number of partitions of n with seven parts in which no part occurs more than twice.

Original entry on oeis.org

1, 2, 3, 6, 9, 14, 21, 30, 41, 57, 75, 99, 129, 165, 207, 261, 322, 396, 483, 585, 701, 840, 995, 1176, 1382, 1617, 1880, 2183, 2518, 2898, 3322, 3797, 4321, 4911, 5556, 6275, 7066, 7939, 8892, 9947, 11092, 12350, 13719, 15214, 16832, 18601, 20507, 22580
Offset: 16

Views

Author

Alois P. Heinz, Oct 16 2018

Keywords

Crossrefs

Column k=7 of A209318.

Formula

G.f.: -(x^12-x^10-x^8-x^7+x^3+x+1)*x^16 / ((x^2-x+1) *(x^4+x^3+x^2+x+1) *(x^6+x^5+x^4+x^3+x^2+x+1) *(x^2+1) *(x^2+x+1)^2 *(x+1)^3 *(x-1)^7).

A320596 Number of partitions of n with eight parts in which no part occurs more than twice.

Original entry on oeis.org

1, 1, 3, 5, 9, 13, 21, 29, 43, 59, 82, 108, 146, 187, 244, 309, 393, 488, 610, 746, 917, 1109, 1343, 1606, 1924, 2277, 2698, 3168, 3719, 4331, 5045, 5833, 6744, 7750, 8900, 10167, 11609, 13189, 14976, 16934, 19132, 21533, 24219, 27143, 30399, 33939, 37859
Offset: 20

Views

Author

Alois P. Heinz, Oct 16 2018

Keywords

Crossrefs

Column k=8 of A209318.

Formula

G.f.: (x^15-x^11-x^10-x^8-x^7+x^4+x^3+x^2+1)*x^20 / ((x^2-x+1) *(x^4+x^3+x^2+x+1) *(x^4+1) *(x^6+x^5+x^4+x^3+x^2+x+1) *(x^2+1)^2 *(x^2+x+1)^2 *(x+1)^4 *(x-1)^8).

A320597 Number of partitions of n with nine parts in which no part occurs more than twice.

Original entry on oeis.org

1, 2, 3, 6, 10, 15, 24, 35, 50, 71, 98, 131, 178, 234, 304, 393, 503, 633, 798, 992, 1225, 1506, 1839, 2226, 2692, 3229, 3856, 4587, 5434, 6400, 7526, 8804, 10266, 11934, 13830, 15964, 18397, 21123, 24192, 27640, 31505, 35805, 40629, 45978, 51928, 58531, 65849
Offset: 25

Views

Author

Alois P. Heinz, Oct 16 2018

Keywords

Crossrefs

Column k=9 of A209318.

Programs

Formula

G.f.: (x^20-x^19-x^18-x^16+x^14+2*x^11+x^10+x^9+x^8-x^6-x^4-x^3-x-1)*x^25 / ((x^2-x+1) *(x^4+x^3+x^2+x+1) *(x^6+x^3+1) *(x^4+1) *(x^6+x^5+x^4+x^3+x^2+x+1) *(x^2+1)^2 *(x^2+x+1)^3 *(x+1)^4 *(x-1)^9).

A320598 Number of partitions of n with ten parts in which no part occurs more than twice.

Original entry on oeis.org

1, 1, 3, 5, 9, 14, 23, 32, 49, 69, 98, 133, 184, 242, 324, 421, 547, 698, 893, 1119, 1408, 1745, 2160, 2646, 3240, 3923, 4751, 5705, 6838, 8142, 9682, 11434, 13491, 15830, 18540, 21616, 25164, 29160, 33748, 38906, 44778, 51364, 58833, 67165, 76579, 87060
Offset: 30

Views

Author

Alois P. Heinz, Oct 16 2018

Keywords

Crossrefs

Column k=10 of A209318.

Formula

G.f.: -(x^25 -x^23 -x^21 -x^20 -x^17 +x^16 +x^14 +2*x^13 +x^12 +x^11 +x^10 +x^7 -x^6 -x^5 -x^4 -x^3 -x^2 -1) *x^30 / ((x^2-x+1) *(x^4-x^3+x^2-x+1) *(x^6+x^3+1) *(x^4+1) *(x^6+x^5+x^4+x^3+x^2+x+1) *(x^2+1)^2 *(x^4+x^3+x^2+x+1)^2 *(x^2+x+1)^3 *(x+1)^5 *(x-1)^10).
Showing 1-10 of 10 results.