A275605 Number of set partitions of [n] such that j is member of block b only if b = 1 or at least one of j-1, j-2 is member of a block >= b-1.
1, 1, 2, 5, 15, 51, 191, 773, 3336, 15207, 72697, 362447, 1876392, 10051083, 55544661, 315899245, 1845139684, 11048651523, 67719859612, 424287619507, 2714074517843, 17706680249505, 117704101959444, 796546613501759, 5483490237025393, 38372546811580251
Offset: 0
Keywords
Examples
The sequence of numerals starts 0, 1, 10, 11, 12, 100, 101, 102, 110, 111, 112, 120, 121, 122, 123. To get the numeral following 12, we first increment the final digit: 13. But the digits before the 3 are 0 (implied) and 1, and 3 is greater than either of those by more than 1. So we set the last digit to 0, and increment the previous one: 20. Again, 2 is too large for the two implicit zeros in front of it, so we set it to 0 and increment the preceding digit, an implicit zero; so we get 100, which presents no problems. The length 3 numerals come from the numerals less than 100: 0, 1, 10, 11, 12. Inserting leading zeros to length 3 gives 000, 001, 010, 011, 012. The values of 1, 10, 100, 1000, etc. make up the sequence. a(5) = 51 = 52 - 1 = A000110(5) - 1 counts all set partitions of [5] except: 134|2|5. - _Alois P. Heinz_, May 27 2017
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..400
- Benedict Irwin, Integer Sequences by Counting Rules.
- Zhicong Lin, Restricted inversion sequences and enhanced 3-noncrossing partitions, arXiv:1706.07213 [math.CO], 2017.
Programs
-
Maple
b:= proc(n, i, j) option remember; `if`(n=0, 1, add(b(n-1, max(j, k), k), k=1..i+1)) end: a:= n-> b(n, 0$2): seq(a(n), n=0..30); # Alois P. Heinz, May 26 2017
-
Mathematica
SIZ = 30;MAX = 100000; M = Table[0, {n, 1, SIZ + 2}]; For[i = 0, i <= MAX, i++,sum = 0;For[j = 1, j <= SIZ, j++,sum += M[[j]];] If[sum == 1, Print[i]]M[[1]]++; For[j = 1, j <= SIZ, j++,If[M[[j]] > M[[j + 1]] + 1 && M[[j]] > M[[j + 2]] + 1, M[[j]] = 0; M[[j + 1]]++]]] (* Benedict W. J. Irwin, Nov 14 2016 *) b[n_, i_, j_] := b[n, i, j] = If[n==0, 1, Sum[b[n-1, Max[j, k], k], {k, 1, i+1} ] ]; a[n_] := b[n, 0, 0]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jun 23 2017, after Alois P. Heinz *)
Extensions
Edited by Franklin T. Adams-Watters, May 26 2017
More terms and new name from Alois P. Heinz, May 26 2017
Comments