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.

A025147 Number of partitions of n into distinct parts >= 2.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 2, 3, 3, 5, 5, 7, 8, 10, 12, 15, 17, 21, 25, 29, 35, 41, 48, 56, 66, 76, 89, 103, 119, 137, 159, 181, 209, 239, 273, 312, 356, 404, 460, 522, 591, 669, 757, 853, 963, 1085, 1219, 1371, 1539, 1725, 1933, 2164, 2418, 2702, 3016, 3362, 3746, 4171, 4637, 5155
Offset: 0

Views

Author

Keywords

Comments

From R. J. Mathar, Jul 31 2008: (Start)
These "partitions of n into distinct parts >= k" and "partitions of n into distinct parts, the least being k-1" come in pairs of similar, almost shifted but not identical, sequences:
The distinction in the definitions is that "distinct parts >= k" sets a lower bound to all parts, whereas "the least being ..." means that the lower limit must be attained by one of the parts. (End)
From N. J. A. Sloane, Sep 28 2008: (Start)
Generating functions and Maple programs for the sequences in the first and second columns of the above list are respectively:
For A025147, A025148, etc.:
f:=proc(k) product(1+x^j, j=k..100): series(%,x,100): seriestolist(%); end;
For A096765, A096749, etc.:
g:=proc(k) x^(k-1)*product(1+x^j, j=k..100): series(%,x,100): seriestolist(%); end; (End)
Also number of partitions of n+1 into distinct parts, the least being 1.
Number of different sums from 1+[1,3]+[1,4]+...+[1,n]. - Jon Perry, Jan 01 2004
Also number of partitions of n such that if k is the largest part, then all parts from 1 to k occur, k occurring at least twice. Example: a(7)=3 because we have [2,2,2,1],[2,2,1,1,1] and [1,1,1,1,1,1,1]. - Emeric Deutsch, Apr 09 2006
Also number of partitions of n+1 such that if k is the largest part, then all parts from 1 to k occur, k occurring exactly once. Example: a(7)=3 because we have [3,2,2,1],[3,2,1,1,1] and [2,1,1,1,1,1,1] (there is a simple bijection with the partitions defined before). - Emeric Deutsch, Apr 09 2006
Also number of partitions of n+1 into distinct parts where the number of parts is itself a part. - Reinhard Zumkeller, Nov 04 2007
Partial sums give A038348 (observed by Jonathan Vos Post, proved by several correspondents).
Trivially, number of partitions of n into distinct parts (as ascending lists) such that the first part is not 1, the second not 2, the third not 3, etc., see example. - Joerg Arndt, Jun 10 2013
Convolution with A033999 gives A270144 (apart from the offset). - R. J. Mathar, Jun 18 2016

Examples

			a(7) = 3, from {{3, 4}, {2, 5}, {7}}
From _Joerg Arndt_, Jun 10 2013: (Start)
There are a(17) = 21 partitions of 17 into distinct parts >=2:
01:  [ 2 3 4 8 ]
02:  [ 2 3 5 7 ]
03:  [ 2 3 12 ]
04:  [ 2 4 5 6 ]
05:  [ 2 4 11 ]
06:  [ 2 5 10 ]
07:  [ 2 6 9 ]
08:  [ 2 7 8 ]
09:  [ 2 15 ]
10:  [ 3 4 10 ]
11:  [ 3 5 9 ]
12:  [ 3 6 8 ]
13:  [ 3 14 ]
14:  [ 4 5 8 ]
15:  [ 4 6 7 ]
16:  [ 4 13 ]
17:  [ 5 12 ]
18:  [ 6 11 ]
19:  [ 7 10 ]
20:  [ 8 9 ]
21:  [ 17 ]
(End)
		

References

  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem, Mathematics and Computer Education, Vol. 31, No. 1, pp. 24-28, Winter 1997. MathEduc Database (Zentralblatt MATH, 1997c.01891).
  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem II, Missouri Journal of Mathematical Sciences, Vol. 16, No. 1, Winter 2004, pp. 12-17. Zentralblatt MATH, Zbl 1071.05501.

Crossrefs

Programs

  • Haskell
    a025147 = p 2 where
       p _ 0 = 1
       p k m = if m < k then 0 else p (k + 1) (m - k) + p (k + 1) m
    -- Reinhard Zumkeller, Dec 28 2011
    
  • Maple
    g:=product(1+x^j,j=2..65): gser:=series(g,x=0,62): seq(coeff(gser,x,n),n=0..57); # Emeric Deutsch, Apr 09 2006
    with(combstruct):ZL := {L = PowerSet(Sequence(Z,card>=2)) },unlabeled:seq(count([L,ZL],size=i),i=0..57); # Zerinvary Lajos, Mar 09 2007
  • Mathematica
    CoefficientList[Series[Product[1+q^n, {n, 2, 60}], {q, 0, 60}], q]
    FoldList[ PartitionsQ[ #2+1 ]-#1&, 0, Range[ 64 ] ]
    (* also *)
    d[n_] := Select[IntegerPartitions[n], Max[Length /@ Split@#] == 1 && Min[#] >= 2 &]; Table[d[n], {n, 12}] (* strict partitions, parts >= 2 *)
    Table[Length[d[n]], {n, 40}] (* A025147 for n >= 1 *)
    (* Clark Kimberling, Mar 07 2014 *)
    p[, 0] = 1; p[k, m_] := p[k, m] = If[m < k, 0, p[k+1, m-k] + p[k+1, m]]; Table[p[2, m], {m, 0, 59}] (* Jean-François Alcover, Apr 17 2014, after Reinhard Zumkeller *)
  • PARI
    a(n)=if(n,my(v=partitions(n));sum(i=1,#v,v[i][1]>1&&v[i]==vecsort(v[i],,8)),1) \\ Charles R Greathouse IV, Nov 20 2012

Formula

G.f.: Product_{k>=2} (1+x^k).
a(n) = A000009(n)-a(n-1) = Sum_{0<=k<=n} (-1)^k*A000009(n-k). - Henry Bottomley, May 09 2002
a(n)=t(n, 1), where t(n, k)=1+Sum_{i>j>k and i+j=n} t(i, j), 2<=k<=n. - Reinhard Zumkeller, Jan 01 2003
G.f.: 1 + Sum_{k=1..infinity} (x^(k*(k+3)/2) / Product_{j=1..k} (1-x^j)). - Emeric Deutsch, Apr 09 2006
The previous g.f. is a special case of the g.f. for partitions into distinct parts >= L, Sum_{n>=0} ( x^(n*(n+2*L-1)/2) / Product_{k=1..n} (1-x^k) ). - Joerg Arndt, Mar 24 2011
G.f.: Sum_{n>=1} ( x^(n*(n+1)/2-1) / Product_{k=1..n-1} (1-x^k) ), a special case of the g.f. for partitions into distinct parts >= L, Sum_{n>=L-1} ( x^(n*(n+1)/2-L*(L-1)/2) / Product_{k=1..n-(L-1)} (1-x^k) ). - Joerg Arndt, Mar 27 2011
a(n) = Sum_{1A060016(n-k+1,k-1), for n>0. - Reinhard Zumkeller, Nov 04 2007
a(n) = A096765(n+1). - R. J. Mathar, Jul 31 2008
From Vaclav Kotesovec, Aug 16 2015: (Start)
a(n) ~ 1/2 * A000009(n).
a(n) ~ exp(Pi*sqrt(n/3)) / (8*3^(1/4)*n^(3/4)).
(End)

Extensions

Corrected and extended by Dean Hickerson, Oct 10 2001

A096765 Number of partitions of n into distinct parts, the least being 1.

Original entry on oeis.org

0, 1, 0, 1, 1, 1, 2, 2, 3, 3, 5, 5, 7, 8, 10, 12, 15, 17, 21, 25, 29, 35, 41, 48, 56, 66, 76, 89, 103, 119, 137, 159, 181, 209, 239, 273, 312, 356, 404, 460, 522, 591, 669, 757, 853, 963, 1085, 1219, 1371, 1539, 1725, 1933, 2164, 2418, 2702, 3016, 3362, 3746, 4171, 4637
Offset: 0

Views

Author

N. J. A. Sloane, Sep 28 2008

Keywords

Comments

The old entry with this sequence number was a duplicate of A071569.
a(n) is also the total number of 1's in all partitions of n into distinct parts. For n=6 there are partitions [6], [5,1], [4,2], [3,2,1] and only two contain a 1, hence a(6) = 2. - T. Amdeberhan, May 13 2012
a(n), n > 1 is the Euler transform of [0,1,1] joined with period [0,1]. - Georg Fischer, Aug 15 2020

Examples

			G.f. = x + x^3 + x^4 + x^5 + 2*x^6 + 2*x^7 + 3*x^8 + 3*x^9 + 5*x^10 + 5*x^11 + ...
		

Crossrefs

Cf. A096749 (least=2), A022824 (3), A022825 (4), A022826 (5), A022827 (6), A022828 (7), A022829 (8), A022830 (9), A022831 (10).

Programs

  • Maple
    b:= proc(n, i) option remember;
          `if`(n=0, 1, `if`((i-1)*(i+2)/2 `if`(n<1, 0, b(n-1$2)):
    seq(a(n), n=0..100);  # Alois P. Heinz, Feb 07 2014
    # Using the function EULER from Transforms (see link at the bottom of the page).
    [0,1,op(EULER([0,1,seq(irem(n,2),n=1..56)]))]; # Peter Luschny, Aug 19 2020
  • Mathematica
    p[, 0] = 1; p[k, n_] := p[k, n] = If[n < k, 0, p[k+1, n-k] + p[k+1, n]]; a[n_] := p[2, n-1]; Table[a[n], {n, 0, 59}] (* Jean-François Alcover, Apr 17 2014, after Reinhard Zumkeller *)
    a[ n_] := SeriesCoefficient[ x / ((1 + x) Product[ 1 - x^j, {j, 1, n, 2}]), {x, 0, n}]; (* Michael Somos, Sep 10 2016 *)
    a[ n_] := If[ n < 0, 0, SeriesCoefficient[  Sum[ x^(k (k + 1)/2) / Product[ 1 - x^j, {j, 1, k - 1}], {k, 1, Quotient[-1 + Sqrt[8 n + 1], 2]}], {x, 0, n}]]; (* Michael Somos, Sep 10 2016 *)
    Join[{0}, Table[Count[Last /@ Select[IntegerPartitions@n, DeleteDuplicates[#] == # &], 1], {n, 66}]] (* Robert Price, Jun 13 2020 *)
  • PARI
    {a(n) = if( n<1, 0, polcoeff( x / ((1 + x) * prod(k=1, (n+1)\2, 1 - x^(2*k-1), 1 + O(x^n))), n))}; /* Michael Somos, Sep 10 2016 */

Formula

a(n) = A025147(n-1), n>1. - R. J. Mathar, Jul 31 2008
G.f.: x*Product_{j=2..infinity} (1+x^j). - R. J. Mathar, Jul 31 2008
G.f.: x / ((1 + x) * Product_{k>0} (1 - x^(2*k-1))). - Michael Somos, Sep 10 2016
G.f.: Sum_{k>0} x^(k*(k+1)/2) / Product_{j=1..k-1} (1 - x^j). - Michael Somos, Sep 10 2016

A025148 Number of partitions of n into distinct parts >= 3.

Original entry on oeis.org

1, 0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 4, 5, 6, 7, 9, 10, 12, 15, 17, 20, 24, 28, 32, 38, 44, 51, 59, 68, 78, 91, 103, 118, 136, 155, 176, 201, 228, 259, 294, 332, 375, 425, 478, 538, 607, 681, 764, 858, 961, 1075, 1203, 1343, 1499, 1673, 1863, 2073, 2308, 2564, 2847, 3161, 3504
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A025147.

Programs

  • Maple
    with(combstruct) ; sys := {L = PowerSet(Sequence(Z,card>2)) }; seq( count([L,sys],size=i), i=0..56 ); # Zerinvary Lajos, Mar 08 2007
    A025148 := proc(n) mul(1+x^k,k=3..n+1) ; expand(%) ; coeftayl(%,x=0,n) ; end proc: # R. J. Mathar, Mar 28 2011
    # third Maple program:
    b:= proc(n, i) option remember;
          `if`(n=0, 1, `if`((i-2)*(i+3)/2 b(n$2):
    seq(a(n), n=0..100);  # Alois P. Heinz, Feb 07 2014
  • Mathematica
    d[n_] := Select[IntegerPartitions[n], Max[Length /@ Split@#] == 1 && Min[#] >= 3 &]; Table[d[n], {n, 16}] (* strict partitions, parts >= 3 *)
    Table[Length[d[n]], {n, 40}] (* A025148 for n >= 1 *)
    (* Clark Kimberling, Mar 07 2014 *)
    b[n_, i_] := b[n, i] = If[n==0, 1, If[(i-2)*(i+3)/2Jean-François Alcover, Oct 22 2015, after Alois P. Heinz *)

Formula

G.f.: Product_{k>=3} (1+x^k).
a(n) = A096749(n+2). - R. J. Mathar, Jul 31 2008
G.f.: sum(n>=0, x^(n*(n+5)/2) / prod(k=1..n, 1-x^k) ); special case of g.f. for partitions into distinct parts >= L, sum(n>=0, x^(n*(n+2*L-1)/2) / prod(k=1..n, 1-x^k) ). - Joerg Arndt, Mar 24 2011
G.f.: sum(n>=2, x^(n*(n+1)/2-3) / prod(k=1..n-2, 1-x^k) ), a special case of the g.f. for partitions into distinct parts >= L, sum(n>=L-1, x^(n*(n+1)/2-L*(L-1)/2) / prod(k=1..n-(L-1), 1-x^k) ). - Joerg Arndt, Mar 27 2011
a(n) + a(n+1) + a(n+2) + a(n+3) = A000009(n+3). - Vaclav Kotesovec, Oct 22 2015
a(n) ~ 1/4 * A000009(n). - Vaclav Kotesovec, Oct 22 2015

A339163 Number of compositions (ordered partitions) of n into distinct parts, the least being 2.

Original entry on oeis.org

0, 0, 1, 0, 0, 2, 2, 2, 2, 8, 8, 14, 14, 20, 44, 50, 74, 104, 128, 158, 326, 356, 524, 698, 986, 1160, 1592, 2606, 3158, 4316, 5708, 7706, 10082, 12920, 16136, 25718, 30614, 41756, 53396, 71978, 91058, 122144, 149384, 193670, 279614, 342860, 447764, 581234
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 25 2020

Keywords

Examples

			a(9) = 8 because we have [7, 2], [4, 3, 2], [4, 2, 3], [3, 4, 2], [3, 2, 4], [2, 7], [2, 4, 3] and [2, 3, 4].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember;
          `if`(n=0, p!, `if`((i-2)*(i+3)/2 `if`(n<2, 0, b(n-2$2, 1)):
    seq(a(n), n=0..55);  # Alois P. Heinz, Nov 25 2020
  • Mathematica
    nmax = 47; CoefficientList[Series[Sum[k! x^(k (k + 3)/2)/Product[1 - x^j, {j, 1, k - 1}], {k, 1, nmax}], {x, 0, nmax}], x]

Formula

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

A026824 Number of partitions of n into distinct parts, the least being 3.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 6, 6, 8, 9, 11, 12, 15, 17, 20, 23, 27, 31, 36, 41, 47, 55, 62, 71, 81, 93, 105, 120, 135, 154, 174, 197, 221, 251, 281, 317, 356, 400, 447, 502, 561, 628, 701, 782, 871, 972, 1081, 1202, 1336, 1483, 1645, 1825, 2021, 2237, 2476
Offset: 0

Views

Author

Keywords

Comments

Also, number of partitions of n such that if k is the largest part, then k occurs exactly 3 times and each of the numbers 1,2,...,k-1 occur at least once (these are the conjugates of the partitions described in the definition). Example: a(14)=3 because we have [3,3,3,2,2,1],[3,3,3,2,1,1,1] and [2,2,2,1,1,1,1,1,1,1,1]. - Emeric Deutsch, Apr 17 2006
For n > 3, a(n) is the Euler transform of [0,0,0,1,1,1,1] joined with the period 2 sequence [0,1, ...]. - Georg Fischer, Aug 18 2020

Examples

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

Crossrefs

Cf. A096765 (least=1), A096749 (2), A022825 (4), A022826 (5), A022827 (6), A022828 (7), A022829 (8), A022830 (9), A022831 (10).

Programs

  • Maple
    g:=x^3*product(1+x^j,j=4..80): gser:=series(g,x=0,70): seq(coeff(gser,x,n),n=1..59); # Emeric Deutsch, Apr 17 2006
    # second Maple program:
    b:= proc(n, i) option remember;
          `if`(n=0, 1, `if`((i-3)*(i+4)/2 `if`(n<3, 0, b(n-3$2)):
    seq(a(n), n=0..60); # Alois P. Heinz, Feb 07 2014
  • Mathematica
    b[n_, i_] :=  b[n, i] = If[n == 0, 1, If[(i-3)(i+4)/2 < n, 0, Sum[b[n-i*j, i-1], {j, 0, Min[1, n/i]}]]]; a[n_] := If[n<3, 0, b[n-3, n-3]]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, May 13 2015, after Alois P. Heinz *)
    nmax = 100; CoefficientList[Series[x^3/((1+x)*(1+x^2)*(1+x^3)) * Product[1+x^k, {k, 1, nmax}], {x, 0, nmax}], x] (* Vaclav Kotesovec, Oct 30 2015 *)
    Join[{0}, Table[Count[Last /@ Select[IntegerPartitions@n, DeleteDuplicates[#] == # &], 3], {n, 1, 66}]] (* Robert Price, Jun 13 2020 *)

Formula

From Emeric Deutsch, Apr 17 2006: (Start)
G.f.: (x^3)*Product_{j=4..infinity} (1+x^j).
G.f.: Sum_{k=1..infinity} x^(k*(k+5)/2)/(Product_{j=1..k-1} (1-x^j)). (End)
a(n) = A025149(n-3), n>3. - R. J. Mathar, Jul 31 2008
a(n) ~ exp(Pi*sqrt(n/3)) / (32*3^(1/4)*n^(3/4)). - Vaclav Kotesovec, Oct 30 2015

Extensions

More terms from Emeric Deutsch, Apr 17 2006

A374705 Number of integer compositions of n whose leaders of maximal strictly increasing runs sum to 2.

Original entry on oeis.org

0, 0, 2, 0, 2, 3, 4, 7, 8, 14, 17, 27, 33, 48, 63, 84, 112, 147, 191, 248, 322, 409, 527, 666, 845, 1062, 1336, 1666, 2079, 2579, 3190, 3936, 4842, 5933, 7259, 8854, 10768, 13074, 15826, 19120, 23048, 27728, 33279, 39879, 47686, 56916, 67818, 80667, 95777, 113552, 134396
Offset: 0

Views

Author

Gus Wiseman, Aug 12 2024

Keywords

Comments

The leaders of strictly increasing runs in a sequence are obtained by splitting it into maximal strictly increasing subsequences and taking the first term of each.

Examples

			The a(0) = 0 through a(9) = 14 compositions:
  .  .  (2)   .  (112)  (23)   (24)    (25)    (26)    (27)
        (11)     (121)  (113)  (114)   (115)   (116)   (117)
                        (131)  (141)   (151)   (161)   (171)
                               (1212)  (1123)  (1124)  (234)
                                       (1213)  (1214)  (1125)
                                       (1231)  (1241)  (1134)
                                       (1312)  (1313)  (1215)
                                               (1412)  (1251)
                                                       (1314)
                                                       (1341)
                                                       (1413)
                                                       (1512)
                                                       (12123)
                                                       (12312)
		

Crossrefs

For leaders of weakly decreasing runs we have A004526.
The case of strict compositions is A096749.
For leaders of anti-runs we have column k = 2 of A374521.
Leaders of strictly increasing runs in standard compositions are A374683.
Ranked by positions of 2s in A374684.
Column k = 2 of A374700.
A003242 counts anti-run compositions.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A274174 counts contiguous compositions, ranks A374249.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],Total[First/@Split[#,Less]]==2&]],{n,0,15}]
  • PARI
    seq(n)={my(A=O(x^(n-1)), q=eta(x^2 + A)/eta(x + A)); Vec((q*x/(1 + x))^2 + q*x^2/((1 + x)*(1 + x^2)), -n-1)} \\ Andrew Howroyd, Aug 14 2024

Formula

G.f.: (x*Q(x)/(1 + x))^2 + x^2*Q(x)/((1 + x)*(1 + x^2)), where Q(x) is the g.f. of A000009. - Andrew Howroyd, Aug 14 2024

Extensions

a(26) onwards from Andrew Howroyd, Aug 14 2024
Showing 1-6 of 6 results.