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

A244393 Number of partitions of n the largest part of which, call it m, appears once, m-1 appears at most twice, m-2 appears at most thrice, etc.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 9, 13, 17, 25, 33, 45, 61, 82, 106, 142, 183, 238, 306, 395, 499, 638, 804, 1014, 1268, 1586, 1967, 2447, 3018, 3721, 4566, 5598, 6827, 8328, 10108, 12257, 14812, 17884, 21508, 25856, 30980, 37076, 44261, 52776, 62768, 74578, 88407, 104681, 123703, 146018, 172019, 202445, 237830, 279087, 326991, 382706
Offset: 0

Views

Author

David S. Newman, Jul 03 2014

Keywords

Examples

			For n=6 the partitions counted are 6, 51, 42, 411, 321, 3111
The a(9) = 17 such partitions of 9 are:
01:  [ 3 2 2 1 1 ]
02:  [ 4 2 1 1 1 ]
03:  [ 4 2 2 1 ]
04:  [ 4 3 1 1 ]
05:  [ 4 3 2 ]
06:  [ 5 1 1 1 1 ]
07:  [ 5 2 1 1 ]
08:  [ 5 2 2 ]
09:  [ 5 3 1 ]
10:  [ 5 4 ]
11:  [ 6 1 1 1 ]
12:  [ 6 2 1 ]
13:  [ 6 3 ]
14:  [ 7 1 1 ]
15:  [ 7 2 ]
16:  [ 8 1 ]
17:  [ 9 ]
		

Crossrefs

Cf. A244395.

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, 1,
          `if`(i<1, 0, b(n, i-1, `if`(t=1, 1, t+1))+add(
             b(n-i*j, i-1, t+1), j=1..min(t, n/i))))
        end:
    a:= n-> b(n$2, 1):
    seq(a(n), n=0..60);  # Alois P. Heinz, Jul 29 2017
  • Mathematica
    nend=20;
    For[n=1,n<=nend,n++,
    count[n]=0;
    Ip=IntegerPartitions[n];
    For[i=1,i<=Length[Ip],i++,
    m=Max[Ip[[i]]];
    condition=True;
    Tip=Tally[Ip[[i]]];
    For[j=1,j<=Length[Tip],j++,
    condition=condition&&(Tip[[j]][[2]]<= m-Tip[[j]][[1]]+1)];
    If[condition,count[n]++(*;Print[Ip[[i]]]*)]];
    ]
    Table[count[i],{i,1,nend}]
    (* Second program: *)
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, If[i < 1, 0,
         b[n, i - 1, If[t == 1, 1, t + 1]] + Sum[
         b[n - i*j, i - 1, t + 1], {j, 1, Min[t, n/i]}]]];
    a[n_] := b[n, n, 1];
    a /@ Range[0, 60] (* Jean-François Alcover, Jun 05 2021, after Alois P. Heinz *)

Extensions

More terms from Joerg Arndt, Jul 03 2014

A295261 Partitions into parts with frequency less than or equal to their place in the list of summands.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 4, 6, 8, 11, 12, 18, 22, 28, 34, 44, 54, 69, 82, 102, 125, 154, 185, 226, 271, 327, 393, 474, 562, 673, 797, 947, 1124, 1329, 1563, 1846, 2164, 2541, 2974, 3480, 4062, 4738, 5508, 6403, 7432, 8614, 9966, 11530, 13307, 15345, 17670, 20337
Offset: 0

Views

Author

David S. Newman, Nov 18 2017

Keywords

Comments

Let the summands of a partition be s(1) < s(2) < ... < s(k) and the frequency of s(i) be f(i). Then we count those partitions for which f(i) <= i.

Examples

			The partition 1+1 is not counted because its smallest part, 1, appears twice.
The partition 3+2+2+1 is counted because its smallest part, 1, appears once; its next smallest part, 2 appears twice (and 2 <= 2) and its third part, 3, appears 1 time (and 1 <= 3).
		

Crossrefs

Cf. A244395.

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(n b(n, 1$2):
    seq(a(n), n=0..60);  # Alois P. Heinz, Nov 18 2017
  • Mathematica
    << Combinatorica`;
    nend = 30;
    For[n = 1, n <= nend, n++, count[n] = 0;
      part = Partitions[n];
      For[i = 1, i <= Length[part], i++,
       t = Tally[part[[i]]];
       condition = True;
       For[j = 1, j <= Length[t], j++,
        If[t[[-j, 2]] > j, condition = False ]];
       If[condition, count[n]++]]];
    Print[Table[count[i], {i, 1, nend}]]

Extensions

More terms from Alois P. Heinz, Nov 18 2017
Showing 1-2 of 2 results.