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

A220504 Triangle read by rows: T(n,k) is the total number of appearances of k as the smallest part in all partitions of n.

Original entry on oeis.org

1, 2, 1, 4, 0, 1, 7, 2, 0, 1, 12, 1, 0, 0, 1, 19, 4, 2, 0, 0, 1, 30, 3, 1, 0, 0, 0, 1, 45, 8, 1, 2, 0, 0, 0, 1, 67, 7, 4, 1, 0, 0, 0, 0, 1, 97, 15, 3, 1, 2, 0, 0, 0, 0, 1, 139, 15, 4, 1, 1, 0, 0, 0, 0, 0, 1, 195, 27, 8, 4, 1, 2, 0, 0, 0, 0, 0, 1, 272, 29, 8, 3, 1, 1, 0, 0, 0, 0, 0, 0, 1
Offset: 1

Views

Author

Omar E. Pol, Jan 19 2013

Keywords

Comments

In other words, T(n,k) is the total number of appearances of k in all partitions of n whose smallest part is k.
The sum of row n equals spt(n), the smallest part partition function (see A092269).
T(n,k) is also the sum of row k in the slice n of tetrahedron A209314.

Examples

			Triangle begins:
    1;
    2,  1;
    4,  0, 1;
    7,  2, 0, 1;
   12,  1, 0, 0, 1;
   19,  4, 2, 0, 0, 1;
   30,  3, 1, 0, 0, 0, 1;
   45,  8, 1, 2, 0, 0, 0, 1;
   67,  7, 4, 1, 0, 0, 0, 0, 1;
   97, 15, 3, 1, 2, 0, 0, 0, 0, 1;
  139, 15, 4, 1, 1, 0, 0, 0, 0, 0, 1;
  195, 27, 8, 4, 1, 2, 0, 0, 0, 0, 0, 1;
  272, 29, 8, 3, 1, 1, 0, 0, 0, 0, 0, 0, 1;
  ...
The partitions of 6 with the smallest part in brackets are
..........................
.                      [6]
..........................
.                  [3]+[3]
..........................
.                   4 +[2]
.              [2]+[2]+[2]
..........................
.                   5 +[1]
.               3 + 2 +[1]
.               4 +[1]+[1]
.           2 + 2 +[1]+[1]
.           3 +[1]+[1]+[1]
.       2 +[1]+[1]+[1]+[1]
.  [1]+[1]+[1]+[1]+[1]+[1]
..........................
There are 19 smallest parts of size 1. Also there are four smallest parts of size 2. Also there are two smallest parts of size 3. There are no smallest part of size 4 or 5. Finally there is only one smallest part of size 6. So row 6 gives 19, 4, 2, 0, 0, 1. The sum of row 6 is 19+4+2+0+0+1 = A092269(6) = 26.
		

Crossrefs

Columns 1-3: A000070, A087787, A174455.
Row sums give A092269.

Programs

  • Maple
    b:= proc(n, i) option remember; local j, r; if n=0 or i<1 then 0
          else `if`(irem(n, i, 'r')=0, [0$(i-1), r], []); for j from 0
          to n/i do zip((x, y)->x+y, %, [b(n-i*j, i-1)], 0) od; %[] fi
        end:
    T:= n-> b(n, n):
    seq(T(n), n=1..20);  # Alois P. Heinz, Jan 20 2013
  • Mathematica
    b[n_, i_] := b[n, i] = Module[{j, q, r, pc}, If [n == 0 || i<1, 0, {q, r} = QuotientRemainder[n, i]; pc = If[r == 0, Append[Array[0&, i-1], q], {}]; For[j = 0, j <= n/i, j++, pc = Plus @@ PadRight[{pc, b[n-i*j, i-1]}]]; pc]]; T[n_] := b[n, n]; Table[T[n], {n, 1, 20}] // Flatten (* Jean-François Alcover, Jan 30 2014, after Alois P. Heinz *)

A240056 Number of partitions of n such that m(1) > m(2), where m = multiplicity.

Original entry on oeis.org

0, 1, 1, 1, 3, 4, 5, 9, 12, 16, 24, 32, 42, 59, 77, 100, 134, 173, 221, 288, 366, 463, 590, 741, 926, 1163, 1444, 1787, 2215, 2726, 3342, 4101, 5003, 6087, 7402, 8964, 10827, 13069, 15718, 18865, 22617, 27041, 32263, 38453, 45719, 54264, 64326, 76102, 89884
Offset: 0

Views

Author

Clark Kimberling, Mar 31 2014

Keywords

Examples

			a(7) counts these 9 partitions: 61, 511, 4111, 331, 3211, 31111, 22111, 211111, 1111111.
		

Crossrefs

Programs

  • Mathematica
    z = 60; f[n_] := f[n] = IntegerPartitions[n]; t1 = Table[Count[f[n], p_ /; Count[p, 1] < Count[p, 2]], {n, 0, z}]  (* A182713 *)
    t2 = Table[Count[f[n], p_ /; Count[p, 1] <= Count[p, 2]], {n, 0, z}] (* A182713(n+2) *)
    t3 = Table[Count[f[n], p_ /; Count[p, 1] == Count[p, 2]], {n, 0, z}] (* A174455 *)
    t4 = Table[Count[f[n], p_ /; Count[p, 1] > Count[p, 2]], {n, 0, z}]  (* A240056 *)
    t5 = Table[Count[f[n], p_ /; Count[p, 1] >= Count[p, 2]], {n, 0, z}] (* A240056(n+1) *)

Formula

a(n) = A000041(n) - A182713(n+2) = a(n+1) - A174455(n) for n >= 0.
a(n) ~ exp(sqrt(2*n/3)*Pi) / (2 * 3^(3/2) * n). - Vaclav Kotesovec, Jan 15 2022
Showing 1-3 of 3 results.