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

A026810 Number of partitions of n in which the greatest part is 4.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 2, 3, 5, 6, 9, 11, 15, 18, 23, 27, 34, 39, 47, 54, 64, 72, 84, 94, 108, 120, 136, 150, 169, 185, 206, 225, 249, 270, 297, 321, 351, 378, 411, 441, 478, 511, 551, 588, 632, 672, 720, 764, 816, 864, 920, 972, 1033, 1089, 1154, 1215, 1285, 1350
Offset: 0

Views

Author

Keywords

Comments

Also number of partitions of n into exactly 4 parts.
Also the number of weighted cubic graphs on 4 nodes (=the tetrahedron) with weight n. - R. J. Mathar, Nov 03 2018
From Gus Wiseman, Jun 27 2021: (Start)
Also the number of strict integer partitions of 2n with alternating sum 4, or (by conjugation) partitions of 2n covering an initial interval of positive integers with exactly 4 odd parts. The strict partitions with alternating sum 4 are:
(4) (5,1) (6,2) (7,3) (8,4) (9,5) (10,6)
(5,2,1) (5,3,2) (5,4,3) (6,5,3) (7,6,3)
(6,3,1) (6,4,2) (7,5,2) (8,6,2)
(7,4,1) (8,5,1) (9,6,1)
(6,3,2,1) (6,4,3,1) (6,5,4,1)
(7,4,2,1) (7,4,3,2)
(7,5,3,1)
(8,5,2,1)
(6,4,3,2,1)
(End)

Examples

			From _Gus Wiseman_, Jun 27 2021: (Start)
The a(4) = 1 through a(10) = 9 partitions of length 4:
  (1111)  (2111)  (2211)  (2221)  (2222)  (3222)  (3322)
                  (3111)  (3211)  (3221)  (3321)  (3331)
                          (4111)  (3311)  (4221)  (4222)
                                  (4211)  (4311)  (4321)
                                  (5111)  (5211)  (4411)
                                          (6111)  (5221)
                                                  (5311)
                                                  (6211)
                                                  (7111)
(End)
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers. 3rd ed., Oxford Univ. Press, 1954, p. 275.
  • D. E. Knuth, The Art of Computer Programming, vol. 4,fascicle 3, Generating All Combinations and Partitions, Section 7.2.1.4., p. 56, exercise 31.

Crossrefs

Cf. A001400, A026811, A026812, A026813, A026814, A026815, A026816, A069905 (3 positive parts), A002621 (partial sums), A005044 (first differences).
A non-strict version is A000710 or A088218.
This is column k = 2 of A152146.
A reverse version is A343941.

Programs

  • Magma
    [Round((n^3+3*n^2-9*n*(n mod 2))/144): n in [0..60]]; // Vincenzo Librandi, Oct 14 2015
  • Maple
    A049347 := proc(n)
            op(1+(n mod 3),[1,-1,0]) ;
    end proc:
    A056594 := proc(n)
            op(1+(n mod 4),[1,0,-1,0]) ;
    end proc:
    A026810 := proc(n)
            1/288*(n+1)*(2*n^2+4*n-13+9*(-1)^n) ;
            %-A049347(n)/9 ;
            %+A056594(n)/8 ;
    end proc: # R. J. Mathar, Jul 03 2012
  • Mathematica
    Table[Count[IntegerPartitions[n], {4, _}], {n, 0, 60}]
    LinearRecurrence[{1, 1, 0, 0, -2, 0, 0, 1, 1, -1}, {0, 0, 0, 0, 1, 1, 2, 3, 5, 6}, 60] (* Vincenzo Librandi, Oct 14 2015 *)
    Table[Length[IntegerPartitions[n, {4}]], {n, 0, 60}] (* Eric Rowland, Mar 02 2017 *)
    CoefficientList[Series[x^4/Product[1 - x^k, {k, 1, 4}], {x, 0, 60}], x] (* Robert A. Russell, May 13 2018 *)
  • PARI
    for(n=0, 60, print(n, " ", round((n^3 + 3*n^2 -9*n*(n % 2))/144))); \\ Washington Bomfim, Jul 03 2012
    
  • PARI
    x='x+O('x^60); concat([0, 0, 0, 0], Vec(x^4/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)))) \\ Altug Alkan, Oct 14 2015
    
  • PARI
    vector(60, n, n--; (n+1)*(2*n^2+4*n-13+9*(-1)^n)/288 + real(I^n)/8 - ((n+2)%3-1)/9) \\ Altug Alkan, Oct 26 2015
    
  • PARI
    print1(0,", "); for(n=1,60,j=0;forpart(v=n,j++,,[4,4]); print1(j,", ")) \\ Hugo Pfoertner, Oct 01 2018
    

Formula

G.f.: x^4/((1-x)*(1-x^2)*(1-x^3)*(1-x^4)) = x^4/((1-x)^4*(1+x)^2*(1+x+x^2)*(1+x^2)).
a(n+4) = A001400(n). - Michael Somos, Apr 07 2012
a(n) = round( (n^3 + 3*n^2 -9*n*(n mod 2))/144 ). - Washington Bomfim, Jan 06 2021 and Jul 03 2012
a(n) = (n+1)*(2*n^2+4*n-13+9*(-1)^n)/288 -A049347(n)/9 +A056594(n)/8. - R. J. Mathar, Jul 03 2012
From Gregory L. Simay, Oct 13 2015: (Start)
a(n) = (n^3 + 3*n^2 - 9*n)/144 + a(m) - (m^3 + 3*m^2 - 9*m)/144 if n = 12k + m and m is odd. For example, a(23) = a(12*1 + 11) = (23^3 + 3*23^2 - 9*23)/144 + a(11) - (11^3 + 3*11^2 - 9*11)/144 = 94.
a(n) = (n^3 + 3*n^2)/144 + a(m) - (m^3 + 3*m^2)/144 if n = 12k + m and m is even. For example, a(22) = a(12*1 + 10) = (22^3 + 3*22^2)/144 + a(10) - (10^3 + 3*10^2)/144 = 84. (End)
a(n) = A008284(n,4). - Robert A. Russell, May 13 2018
From Gregory L. Simay, Jul 28 2019: (Start)
a(2n+1) = a(2n) + a(n+1) - a(n-3) and
a(2n) = a(2n-1) + a(n+2) - a(n-2). (End)

A344650 Number of strict odd-length integer partitions of 2n.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 11, 16, 23, 32, 44, 61, 82, 111, 148, 195, 256, 334, 432, 557, 713, 908, 1152, 1455, 1829, 2291, 2859, 3554, 4404, 5440, 6697, 8222, 10066, 12288, 14964, 18176, 22023, 26625, 32117, 38656, 46432, 55661, 66592, 79523, 94793, 112792, 133984
Offset: 0

Views

Author

Gus Wiseman, Jun 05 2021

Keywords

Comments

Also the number of strict integer partitions of 2n with reverse-alternating sum >= 0.
Also the number of reversed strict integer partitions of 2n with alternating sum >= 0.

Examples

			The a(1) = 1 through a(8) = 16 partitions:
  (2)  (4)  (6)      (8)      (10)     (12)     (14)      (16)
            (3,2,1)  (4,3,1)  (5,3,2)  (5,4,3)  (6,5,3)   (7,5,4)
                     (5,2,1)  (5,4,1)  (6,4,2)  (7,4,3)   (7,6,3)
                              (6,3,1)  (6,5,1)  (7,5,2)   (8,5,3)
                              (7,2,1)  (7,3,2)  (7,6,1)   (8,6,2)
                                       (7,4,1)  (8,4,2)   (8,7,1)
                                       (8,3,1)  (8,5,1)   (9,4,3)
                                       (9,2,1)  (9,3,2)   (9,5,2)
                                                (9,4,1)   (9,6,1)
                                                (10,3,1)  (10,4,2)
                                                (11,2,1)  (10,5,1)
                                                          (11,3,2)
                                                          (11,4,1)
                                                          (12,3,1)
                                                          (13,2,1)
                                                          (6,4,3,2,1)
		

Crossrefs

The Heinz numbers are the intersection of A030059 and A300061.
Allowing even length gives A035294 (non-strict: A058696).
Even bisection of A067659.
The opposite type of strict partition (even length and odd sum) is A343942.
The non-strict version is A236559 or A344611.
Row sums of A344649.
A000041 counts partitions of 2n with alternating sum 0, ranked by A000290.
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A120452 counts partitions of 2n with reverse-alternating sum 2.
A124754 gives alternating sums of standard compositions (reverse: A344618).
A152146 interleaved with A152157 counts strict partitions by sum and alternating sum.
A316524 is the alternating sum of the prime indices of n (reverse: A344616).
A343941 counts strict partitions of 2n with reverse-alternating sum 4.
A344604 counts wiggly compositions with twins.
A344739 counts strict partitions by sum and reverse-alternating sum.
A344741 counts partitions of 2n with reverse-alternating sum -2.

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2, 0,
         `if`(n=0, t, add(b(n-i*j, i-1, abs(t-j)), j=0..min(n/i, 1))))
        end:
    a:= n-> b(2*n$2, 0):
    seq(a(n), n=0..80);  # Alois P. Heinz, Aug 05 2021
  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&OddQ[Length[#]]&]],{n,0,30,2}]

Formula

Sum of odd-indexed terms in row 2n of A008289.
a(n) = A067659(2n).

A318156 Expansion of (1/(1 - x)) * Sum_{k>=1} x^(k*(2*k-1)) / Product_{j=1..2*k-1} (1 - x^j).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 9, 12, 16, 21, 27, 35, 44, 55, 69, 85, 104, 127, 154, 186, 224, 268, 320, 381, 452, 534, 630, 741, 869, 1017, 1187, 1382, 1606, 1862, 2155, 2489, 2869, 3301, 3792, 4349, 4979, 5692, 6497, 7405, 8429, 9581, 10876, 12331, 13963, 15792, 17840, 20131, 22691
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 19 2018

Keywords

Comments

Partial sums of A067659.

Examples

			From _Gus Wiseman_, Jul 18 2021: (Start)
Also the number of strict integer partitions of 2n+1 of even length with exactly one odd part. For example, the a(1) = 1 through a(8) = 12 partitions are:
  (2,1)  (3,2)  (4,3)  (5,4)  (6,5)   (7,6)      (8,7)      (9,8)
         (4,1)  (5,2)  (6,3)  (7,4)   (8,5)      (9,6)      (10,7)
                (6,1)  (7,2)  (8,3)   (9,4)      (10,5)     (11,6)
                       (8,1)  (9,2)   (10,3)     (11,4)     (12,5)
                              (10,1)  (11,2)     (12,3)     (13,4)
                                      (12,1)     (13,2)     (14,3)
                                      (6,4,2,1)  (14,1)     (15,2)
                                                 (6,4,3,2)  (16,1)
                                                 (8,4,2,1)  (6,5,4,2)
                                                            (8,4,3,2)
                                                            (8,6,2,1)
                                                            (10,4,2,1)
Also the number of integer partitions of 2n+1 covering an initial interval and having even maximum and alternating sum 1.
(End)
		

Crossrefs

Partial sums of A067659.
The following relate to strict integer partitions of 2n+1 of even length with exactly one odd part.
- Allowing any length gives A036469.
- The non-strict version is A306145.
- The version for odd length is A318155 (non-strict: A304620).
- Allowing any number of odd parts gives A343942 (odd bisection of A067661).
A000041 counts partitions.
A027187 counts partitions of even length (strict: A067661).
A078408 counts strict partitions of 2n+1 (odd bisection of A000009).
A103919 counts partitions by sum and alternating sum (reverse: A344612).

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2, 0,
          `if`(n=0, t, add(b(n-i*j, i-1, abs(t-j)), j=0..min(n/i, 1))))
        end:
    a:= proc(n) option remember; b(n$2, 0)+`if`(n>0, a(n-1), 0) end:
    seq(a(n), n=0..60);
  • Mathematica
    nmax = 53; CoefficientList[Series[1/(1 - x) Sum[x^(k (2 k - 1))/Product[(1 - x^j), {j, 1, 2 k - 1}], {k, 1, nmax}], {x, 0, nmax}], x]
    nmax = 53; CoefficientList[Series[(QPochhammer[-x, x] - QPochhammer[x])/(2 (1 - x)), {x, 0, nmax}], x]
    Table[Length[Select[IntegerPartitions[2n+1],UnsameQ@@#&&EvenQ[Length[#]]&&Count[#,?OddQ]==1&]],{n,0,15}] (* _Gus Wiseman, Jul 18 2021 *)

Formula

a(n) = A036469(n) - A318155(n).
a(n) = A318155(n) - A078616(n).
a(n) ~ exp(Pi*sqrt(n/3)) * 3^(1/4) / (4*Pi*n^(1/4)). - Vaclav Kotesovec, Aug 20 2018

A346634 Number of strict odd-length integer partitions of 2n + 1.

Original entry on oeis.org

1, 1, 1, 2, 4, 6, 9, 14, 19, 27, 38, 52, 71, 96, 128, 170, 224, 293, 380, 491, 630, 805, 1024, 1295, 1632, 2048, 2560, 3189, 3958, 4896, 6038, 7424, 9100, 11125, 13565, 16496, 20013, 24223, 29250, 35244, 42378, 50849, 60896, 72789, 86841, 103424, 122960, 145937
Offset: 0

Views

Author

Gus Wiseman, Aug 01 2021

Keywords

Examples

			The a(0) = 1 through a(7) = 14 partitions:
  (1)  (3)  (5)  (7)      (9)      (11)     (13)      (15)
                 (4,2,1)  (4,3,2)  (5,4,2)  (6,4,3)   (6,5,4)
                          (5,3,1)  (6,3,2)  (6,5,2)   (7,5,3)
                          (6,2,1)  (6,4,1)  (7,4,2)   (7,6,2)
                                   (7,3,1)  (7,5,1)   (8,4,3)
                                   (8,2,1)  (8,3,2)   (8,5,2)
                                            (8,4,1)   (8,6,1)
                                            (9,3,1)   (9,4,2)
                                            (10,2,1)  (9,5,1)
                                                      (10,3,2)
                                                      (10,4,1)
                                                      (11,3,1)
                                                      (12,2,1)
                                                      (5,4,3,2,1)
		

Crossrefs

Odd bisection of A067659, which is ranked by A030059.
The even version is the even bisection of A067661.
The case of all odd parts is counted by A069911 (non-strict: A078408).
The non-strict version is A160786, ranked by A340931.
The non-strict even version is A236913, ranked by A340784.
The even-length version is A343942 (non-strict: A236914).
The even-sum version is A344650 (non-strict: A236559 or A344611).
A000009 counts partitions with all odd parts, ranked by A066208.
A000009 counts strict partitions, ranked by A005117.
A027193 counts odd-length partitions, ranked by A026424.
A027193 counts odd-maximum partitions, ranked by A244991.
A058695 counts partitions of odd numbers, ranked by A300063.
A340385 counts partitions with odd length and maximum, ranked by A340386.
Other cases of odd length:
- A024429 set partitions
- A089677 ordered set partitions
- A166444 compositions
- A174726 ordered factorizations
- A332304 strict compositions
- A339890 factorizations

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n>i*(i+1)/2, 0,
         `if`(n=0, t, add(b(n-i*j, i-1, abs(t-j)), j=0..min(n/i, 1))))
        end:
    a:= n-> b(2*n+1$2, 0):
    seq(a(n), n=0..80);  # Alois P. Heinz, Aug 05 2021
  • Mathematica
    Table[Length[Select[IntegerPartitions[2n+1],UnsameQ@@#&&OddQ[Length[#]]&]],{n,0,15}]

Extensions

More terms from Alois P. Heinz, Aug 05 2021

A318155 Expansion of (1/(1 - x)) * Sum_{k>=0} x^(k*(2*k+1)) / Product_{j=1..2*k} (1 - x^j).

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 7, 10, 13, 17, 22, 28, 35, 44, 55, 68, 84, 103, 126, 153, 185, 223, 268, 320, 381, 452, 535, 631, 742, 870, 1018, 1188, 1383, 1607, 1863, 2155, 2489, 2869, 3301, 3792, 4348, 4978, 5691, 6496, 7404, 8428, 9580, 10875, 12330, 13962, 15791, 17840, 20131, 22691
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 19 2018

Keywords

Comments

Partial sums of A067661.
From Gus Wiseman, Jul 29 2021: (Start)
Also the number of strict integer partitions of 2n+1 of odd length with exactly one odd part. For example, the a(1) = 1 through a(7) = 10 partitions are:
(1) (3) (5) (7) (9) (11) (13) (15)
(4,2,1) (4,3,2) (5,4,2) (6,4,3) (6,5,4)
(6,2,1) (6,3,2) (6,5,2) (7,6,2)
(6,4,1) (7,4,2) (8,4,3)
(8,2,1) (8,3,2) (8,5,2)
(8,4,1) (8,6,1)
(10,2,1) (9,4,2)
(10,3,2)
(10,4,1)
(12,2,1)
The following relate to these partitions:
- Not requiring odd length gives A036469.
- The non-strict version is A304620.
- The version for even instead of odd length is A318156.
- Allowing any number of odd parts gives A346634 (bisection of A067659).
(End)

Crossrefs

First differences are A067661 (non-strict: A027187, odd bisection: A343942).
A000041 counts partitions.
A000070 counts partitions with alternating sum 1.
A078408 counts strict partitions of 2n+1 (odd bisection of A000009).
A103919 counts partitions by sum and alternating sum (reverse: A344612).
A344610 counts partitions by sum and positive reverse-alternating sum.

Programs

  • Mathematica
    nmax = 53; CoefficientList[Series[1/(1 - x) Sum[x^(k (2 k + 1))/Product[(1 - x^j), {j, 1, 2 k}], {k, 0, nmax}], {x, 0, nmax}], x]
    nmax = 53; CoefficientList[Series[(QPochhammer[-x, x] + QPochhammer[x])/(2 (1 - x)), {x, 0, nmax}], x]
    Table[Length[Select[IntegerPartitions[2n+1],UnsameQ@@#&&OddQ[Length[#]]&&Count[#,?OddQ]==1&]],{n,0,15}] (* _Gus Wiseman, Jul 29 2021 *)

Formula

a(n) = A036469(n) - A318156(n).
a(n) = A318156(n) + A078616(n).
a(n) ~ 3^(1/4) * exp(Pi*sqrt(n/3)) / (4*Pi*n^(1/4)). - Vaclav Kotesovec, Aug 20 2018
Showing 1-5 of 5 results.