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

A182713 Number of 3's in the last section of the set of partitions of n.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 2, 3, 6, 6, 10, 14, 18, 24, 35, 42, 58, 76, 97, 124, 164, 202, 261, 329, 412, 514, 649, 795, 992, 1223, 1503, 1839, 2262, 2741, 3346, 4056, 4908, 5919, 7150, 8568, 10297, 12320, 14721, 17542, 20911, 24808, 29456, 34870, 41232, 48652, 57389
Offset: 1

Views

Author

Omar E. Pol, Nov 28 2010

Keywords

Comments

Also number of 3's in all partitions of n that do not contain 1 as a part.
Also 0 together with the first differences of A024787. - Omar E. Pol, Nov 13 2011
a(n) is the number of partitions of n having fewer 1s than 2s; e.g., a(7) counts these 3 partitions: [5, 2], [3, 2, 2], [2, 2, 2, 1]. - Clark Kimberling, Mar 31 2014
The last section of the set of partitions of n is also the n-th section of the set of partitions of any integer >= n. - Omar E. Pol, Apr 07 2014

Examples

			a(7) = 2 counts the 3's in 7 = 4+3 = 3+2+2. The 3's in 7 = 3+3+1 = 3+2+1+1 = 3+1+1+1+1 do not count.
From _Omar E. Pol_, Oct 27 2012: (Start)
--------------------------------------
Last section                   Number
of the set of                    of
partitions of 7                 3's
--------------------------------------
7 .............................. 0
4 + 3 .......................... 1
5 + 2 .......................... 0
3 + 2 + 2 ...................... 1
.   1 .......................... 0
.       1 ...................... 0
.       1 ...................... 0
.           1 .................. 0
.       1 ...................... 0
.           1 .................. 0
.           1 .................. 0
.               1 .............. 0
.               1 .............. 0
.                   1 .......... 0
.                       1 ...... 0
------------------------------------
.       5 - 3 =                  2
.
In the last section of the set of partitions of 7 the difference between the sum of the third column and the sum of the fourth column is 5 - 3 = 2 equaling the number of 3's, so a(7) = 2 (see also A024787).
(End)
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local g, h;
          if n=0 then [1, 0]
        elif i<2 then [0, 0]
        else g:= b(n, i-1); h:= `if`(i>n, [0, 0], b(n-i, i));
             [g[1]+h[1], g[2]+h[2]+`if`(i=3, h[1], 0)]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..70);  # Alois P. Heinz, Mar 18 2012
  • Mathematica
    z = 60; f[n_] := f[n] = IntegerPartitions[n]; t1 = Table[Count[f[n], p_ /; Count[p, 1] < Count[p, 2]], {n, 0, z}] (* Clark Kimberling, Mar 31 2014 *)
    b[n_, i_] := b[n, i] = Module[{g, h}, If[n == 0, {1, 0}, If[i<2, {0, 0}, g = b[n, i-1]; h = If[i>n, {0, 0}, b[n-i, i]]; Join[g[[1]] + h[[1]], g[[2]] + h[[2]] + If[i == 3, h[[1]], 0]]]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 1, 70}] (* Jean-François Alcover, Nov 30 2015, after Alois P. Heinz *)
    Table[Count[Flatten@Cases[IntegerPartitions[n], x_ /; Last[x] != 1], 3], {n, 51}] (* Robert Price, May 15 2020 *)
  • Sage
    A182713 = lambda n: sum(list(p).count(3) for p in Partitions(n) if 1 not in p) # D. S. McNeil, Nov 29 2010

Formula

It appears that A000041(n) = a(n+1) + a(n+2) + a(n+3), n >= 0. - Omar E. Pol, Feb 04 2012
a(n) ~ A000041(n)/3 ~ exp(Pi*sqrt(2*n/3)) / (12*sqrt(3)*n). - Vaclav Kotesovec, Jan 03 2019

A174455 Number of partitions where the number of 1's and 2's are equal.

Original entry on oeis.org

1, 0, 0, 2, 1, 1, 4, 3, 4, 8, 8, 10, 17, 18, 23, 34, 39, 48, 67, 78, 97, 127, 151, 185, 237, 281, 343, 428, 511, 616, 759, 902, 1084, 1315, 1562, 1863, 2242, 2649, 3147, 3752, 4424, 5222, 6190, 7266, 8545, 10062, 11776, 13782, 16157, 18832, 21964, 25622, 29777, 34589, 40200, 46556, 53912
Offset: 0

Views

Author

Joerg Arndt, Nov 28 2010

Keywords

Comments

From Omar E. Pol, Jan 19 2013: (Start)
Column 3 of triangle A220504.
With offset 3, a(n) is also the number of appearances of 3 as the smallest part in all partitions of n.
Also consider the sequence formed by [0, 0] together with this sequence, with offset 1, then it appears that A027336(n) = Sum_{j=1..3} a(n+j), n >= 0.
(End)

Examples

			a(8)=9, there are 8 such partitions of 9, they are
  #1:    9 =  3* 1 + 3* 2 + 0    + 0    + 0    + 0    + 0    + 0    + 0
  #2:    9 =  2* 1 + 2* 2 + 1* 3 + 0    + 0    + 0    + 0    + 0    + 0
  #3:    9 =  1* 1 + 1* 2 + 2* 3 + 0    + 0    + 0    + 0    + 0    + 0
  #4:    9 =  0    + 0    + 3* 3 + 0    + 0    + 0    + 0    + 0    + 0
  #5:    9 =  0    + 0    + 0    + 1* 4 + 1* 5 + 0    + 0    + 0    + 0
  #6:    9 =  1* 1 + 1* 2 + 0    + 0    + 0    + 1* 6 + 0    + 0    + 0
  #7:    9 =  0    + 0    + 1* 3 + 0    + 0    + 1* 6 + 0    + 0    + 0
  #8:    9 =  0    + 0    + 0    + 0    + 0    + 0    + 0    + 0    + 1* 9
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local j, r; if n=0 or i<1 then 0
          else `if`(i=3 and irem(n, 3, 'r')=0, r, 0); for j from 0
          to n/i do %+b(n-i*j, i-1) od; % fi
        end:
    a:= n-> b(n+3, n+3):
    seq(a(n), n=0..60);  # Alois P. Heinz, Jan 20 2013
  • Mathematica
    (* See A240056. - Clark Kimberling, Mar 31 2014 *)
    m = 66; gf = 1/((1-x^3)*Product[1-x^n, {n, 3, m}]) + O[x]^m; CoefficientList[gf, x] (* Jean-François Alcover, Jul 02 2015, after Joerg Arndt *)
  • PARI
    N=66;  x='x+O('x^N);
    gf=1/( (1-x^3) * prod(n=3,N, 1-x^n) );
    Vec(gf)
    /* Joerg Arndt, Jul 07 2012 */

Formula

G.f.: 1/( (1-x^3) * Product_{n>=3} (1-x^n) ). - Joerg Arndt, Jul 07 2012
a(n) = A182713(n+2) - A182713(n) = A240056(n+1) - A240056(n) for n >= 0. - Clark Kimberling, Mar 31 2014
a(n) ~ Pi * exp(sqrt(2*n/3)*Pi) / (9 * 2^(3/2) * n^(3/2)). - Vaclav Kotesovec, Jan 15 2022

A240055 Number of partitions of n such that (number of distinct parts) = m(1) - m(2), where m = multiplicity.

Original entry on oeis.org

1, 1, 0, 0, 0, 2, 1, 1, 3, 2, 4, 5, 7, 6, 14, 11, 17, 22, 30, 28, 45, 55, 61, 78, 103, 114, 147, 183, 202, 269, 316, 372, 446, 565, 631, 778, 935, 1096, 1283, 1586, 1791, 2166, 2558, 2991, 3478, 4182, 4821, 5616, 6660, 7716, 8933, 10532, 12155, 14058, 16482
Offset: 0

Views

Author

Clark Kimberling, Mar 31 2014

Keywords

Examples

			a(10) counts these 4 partitions: 622, 4411, 43111, 421111.
		

Crossrefs

Cf. A240056.

Programs

  • Mathematica
    z = 58; d[p_] := d[p] = Length[DeleteDuplicates[p]]; Table[Count[IntegerPartitions[n],    p_ /; d[p] == Count[p, 1] - Count[p, 2]], {n, 0, z}]
Showing 1-3 of 3 results.