A026898
a(n) = Sum_{k=0..n} (n-k+1)^k.
Original entry on oeis.org
1, 2, 4, 9, 23, 66, 210, 733, 2781, 11378, 49864, 232769, 1151915, 6018786, 33087206, 190780213, 1150653921, 7241710930, 47454745804, 323154696185, 2282779990495, 16700904488706, 126356632390298, 987303454928973, 7957133905608837, 66071772829247410
Offset: 0
G.f.: A(x) = 1 + 2*x + 4*x^2 + 9*x^3 + 23*x^4 + 66*x^5 + 210*x^6 + ...
where we have the identity:
A(x) = 1/(1-x) + x/(1-2*x) + x^2/(1-3*x) + x^3/(1-4*x) + x^4/(1-5*x) + ...
is equal to
A(x) = 1/(1-x) + x/((1-x)^2*(1+x)) + 2!*x^2/((1-x)^3*(1+x)*(1+2*x)) + 3!*x^3/((1-x)^4*(1+x)*(1+2*x)*(1+3*x)) + 4!*x^4/((1-x)^5*(1+x)*(1+2*x)*(1+3*x)*(1+4*x)) + ...
From _Joerg Arndt_, Mar 07 2015: (Start)
The a(5-1) = 23 RGS described in the comment are (dots denote zeros):
01: [ . . . . . ]
02: [ . 1 . . . ]
03: [ . 1 . . 1 ]
04: [ . 1 . 1 . ]
05: [ . 1 . 1 1 ]
06: [ . 1 1 . . ]
07: [ . 1 1 . 1 ]
08: [ . 1 1 1 . ]
09: [ . 1 1 1 1 ]
10: [ . 1 2 . . ]
11: [ . 1 2 . 1 ]
12: [ . 1 2 . 2 ]
13: [ . 1 2 1 . ]
14: [ . 1 2 1 1 ]
15: [ . 1 2 1 2 ]
16: [ . 1 2 2 . ]
17: [ . 1 2 2 1 ]
18: [ . 1 2 2 2 ]
19: [ . 1 2 3 . ]
20: [ . 1 2 3 1 ]
21: [ . 1 2 3 2 ]
22: [ . 1 2 3 3 ]
23: [ . 1 2 3 4 ]
(End)
- Reinhard Zumkeller, Table of n, a(n) for n = 0..500
- Fufa Beyene, Jörgen Backelin, Roberto Mantaci, and Samuel A. Fufa, Set Partitions and Other Bell Number Enumerated Objects, J. Int. Seq., Vol. 26 (2023), Article 23.1.8.
- Giulio Cerbai, Pattern-avoiding modified ascent sequences, arXiv:2401.10027 [math.CO], 2024. See p. 12.
- Giulio Cerbai and Anders Claesson, Counting fixed-point-free Cayley permutations, arXiv:2507.09304 [math.CO], 2025. See p. 25.
- Sajed Haque, Discriminators of Integer Sequences, 2017, See p. 33 Corollary 29.
- Mathematics Stack Exchange, Asymptotics of ..., 2011.
- Chunyan Yan and Zhicong Lin, Inversion sequences avoiding pairs of patterns, arXiv:1912.03674 [math.CO], 2019. See p. 3.
- Robin D. P. Zhou, Pattern avoidance in revised ascent sequences, arXiv:2505.05171 [math.CO], 2025. See p. 4.
-
a026898 n = sum $ zipWith (^) [n + 1, n .. 1] [0 ..]
-- Reinhard Zumkeller, Sep 14 2014
-
[(&+[(n-k+1)^k: k in [0..n]]): n in [0..50]]; // Stefano Spezia, Jan 09 2019
-
a:= n-> add((n+1-j)^j, j=0..n): seq(a(n), n=0..23); # Zerinvary Lajos, Apr 18 2009
-
Table[Sum[(n-k+1)^k, {k,0,n}], {n, 0, 25}] (* Michael De Vlieger, Apr 01 2015 *)
-
{a(n)=polcoeff(sum(m=0,n,x^m/(1-(m+1)*x+x*O(x^n))),n)} /* Paul D. Hanna, Sep 13 2011 */
-
{INTEGRATE(n,F)=local(G=F);for(i=1,n,G=intformal(G));G}
{a(n)=local(A=1+x);A=sum(k=0,n,INTEGRATE(k,exp((k+1)*x+x*O(x^n))));n!*polcoeff(A,n)} \\ Paul D. Hanna, Dec 28 2013
for(n=0,30,print1(a(n),", "))
-
{a(n)=polcoeff( sum(m=0, n, m!*x^m/(1-x +x*O(x^n))^(m+1)/prod(k=1, m, 1+k*x +x*O(x^n))), n)} /* From o.g.f. (Paul D. Hanna, Jul 20 2014) */
for(n=0, 25, print1(a(n), ", "))
-
[sum((n-j+1)^j for j in (0..n)) for n in (0..30)] # G. C. Greubel, Jun 15 2021
A287215
Number T(n,k) of set partitions of [n] such that the maximal absolute difference between the least elements of consecutive blocks equals k; triangle T(n,k), n>=0, 0<=k<=max(n-1,0), read by rows.
Original entry on oeis.org
1, 1, 1, 1, 1, 3, 1, 1, 8, 5, 1, 1, 22, 21, 7, 1, 1, 65, 86, 39, 11, 1, 1, 209, 361, 209, 77, 19, 1, 1, 732, 1584, 1123, 493, 171, 35, 1, 1, 2780, 7315, 6153, 3124, 1293, 413, 67, 1, 1, 11377, 35635, 34723, 20019, 9320, 3709, 1059, 131, 1, 1, 49863, 183080, 202852, 130916, 66992, 30396, 11373, 2837, 259, 1
Offset: 0
T(4,0) = 1: 1234.
T(4,1) = 8: 134|2, 13|24, 14|23, 1|234, 14|2|3, 1|24|3, 1|2|34, 1|2|3|4.
T(4,2) = 5: 124|3, 12|34, 12|3|4, 13|2|4, 1|23|4.
T(4,3) = 1: 123|4.
Triangle T(n,k) begins:
1;
1;
1, 1;
1, 3, 1;
1, 8, 5, 1;
1, 22, 21, 7, 1;
1, 65, 86, 39, 11, 1;
1, 209, 361, 209, 77, 19, 1;
1, 732, 1584, 1123, 493, 171, 35, 1;
Columns k=0-10 give:
A000012,
A003101(n-1),
A322875,
A322876,
A322877,
A322878,
A322879,
A322880,
A322881,
A322882,
A322883.
-
b:= proc(n, k, m, l) option remember; `if`(n<1, 1,
`if`(l-n>k, 0, b(n-1, k, m+1, n))+m*b(n-1, k, m, l))
end:
A:= (n, k)-> b(n-1, min(k, n-1), 1, n):
T:= (n, k)-> A(n, k)-`if`(k=0, 0, A(n, k-1)):
seq(seq(T(n, k), k=0..max(n-1, 0)), n=0..12);
-
b[n_, k_, m_, l_] := b[n, k, m, l] = If[n < 1, 1, If[l - n > k, 0, b[n - 1, k, m + 1, n]] + m*b[n - 1, k, m, l]];
A[n_, k_] := b[n - 1, Min[k, n - 1], 1, n];
T[n_, k_] := A[n, k] - If[k == 0, 0, A[n, k - 1]];
Table[T[n, k], {n, 0, 12}, {k, 0, Max[n - 1, 0]}] // Flatten (* Jean-François Alcover, May 19 2018, after Alois P. Heinz *)
A287641
Number A(n,k) 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-k is member of a block >= b-1; square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 5, 1, 1, 1, 2, 5, 14, 1, 1, 1, 2, 5, 15, 42, 1, 1, 1, 2, 5, 15, 51, 132, 1, 1, 1, 2, 5, 15, 52, 191, 429, 1, 1, 1, 2, 5, 15, 52, 202, 773, 1430, 1, 1, 1, 2, 5, 15, 52, 203, 861, 3336, 4862, 1, 1, 1, 2, 5, 15, 52, 203, 876, 3970, 15207, 16796, 1
Offset: 0
A(5,0) = 1: 12345.
A(5,1) = 42 = 52 - 10 = A000110(5) - 10 counts all set partitions of [5] except: 124|3|5, 135|2|4, 13|25|4, 13|2|45, 13|2|4|5, 14|23|5, 14|2|35, 14|2|3|5, 1|24|3|5, 134|2|5.
A(5,2) = 51 = 52 - 1 = A000110(5) - 1 counts all set partitions of [5] except: 134|2|5.
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, ...
1, 2, 2, 2, 2, 2, 2, 2, ...
1, 5, 5, 5, 5, 5, 5, 5, ...
1, 14, 15, 15, 15, 15, 15, 15, ...
1, 42, 51, 52, 52, 52, 52, 52, ...
1, 132, 191, 202, 203, 203, 203, 203, ...
1, 429, 773, 861, 876, 877, 877, 877, ...
Columns k=0-10 give:
A000012,
A000108,
A275605,
A287666,
A287667,
A287668,
A287669,
A287670,
A287671,
A287672,
A287673.
-
b:= proc(n, l) option remember; `if`(n=0, 1, add(b(n-1,
[seq(max(l[i], j), i=2..nops(l)), j]), j=1..l[1]+1))
end:
A:= (n, k)-> `if`(k=0, 1, b(n, [0$k])):
seq(seq(A(n, d-n), n=0..d), d=0..12);
-
b[0, ] = 1; b[n, l_List] := b[n, l] = Sum[b[n - 1, Append[ Table[ Max[ l[[i]], j], {i, 2, Length[l]}], j]], {j, 1, l[[1]] + 1}];
A[n_, k_] := If[k == 0, 1, b[n, Table[0, k]]];
Table[A[n, d - n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Apr 30 2018, after Alois P. Heinz *)
A287214
Number A(n,k) of set partitions of [n] such that for each block all absolute differences between consecutive elements are <= k; square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 4, 1, 1, 1, 2, 5, 8, 1, 1, 1, 2, 5, 13, 16, 1, 1, 1, 2, 5, 15, 34, 32, 1, 1, 1, 2, 5, 15, 47, 89, 64, 1, 1, 1, 2, 5, 15, 52, 150, 233, 128, 1, 1, 1, 2, 5, 15, 52, 188, 481, 610, 256, 1, 1, 1, 2, 5, 15, 52, 203, 696, 1545, 1597, 512, 1
Offset: 0
A(4,0) = 1: 1|2|3|4.
A(4,1) = 8: 1234, 123|4, 12|34, 12|3|4, 1|234, 1|23|4, 1|2|34, 1|2|3|4.
A(4,2) = 13: 1234, 123|4, 124|3, 12|34, 12|3|4, 134|2, 13|24, 13|2|4, 1|234, 1|23|4, 1|24|3, 1|2|34, 1|2|3|4.
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, ...
1, 2, 2, 2, 2, 2, 2, 2, ...
1, 4, 5, 5, 5, 5, 5, 5, ...
1, 8, 13, 15, 15, 15, 15, 15, ...
1, 16, 34, 47, 52, 52, 52, 52, ...
1, 32, 89, 150, 188, 203, 203, 203, ...
1, 64, 233, 481, 696, 825, 877, 877, ...
Columns k=0-10 give:
A000012,
A011782,
A001519,
A287275,
A287276,
A287277,
A287278,
A287279,
A287280,
A287281,
A287282.
-
b:= proc(n, k, l) option remember; `if`(n=0, 1, b(n-1, k, map(x->
`if`(x-n>=k, [][], x), [l[], n]))+add(b(n-1, k, sort(map(x->
`if`(x-n>=k, [][], x), subsop(j=n, l)))), j=1..nops(l)))
end:
A:= (n, k)-> b(n, min(k, n-1), []):
seq(seq(A(n, d-n), n=0..d), d=0..12);
-
b[0, , ] = 1; b[n_, k_, l_List] := b[n, k, l] = b[n - 1, k, If[# - n >= k, Nothing, #]& /@ Append[l, n]] + Sum[b[n - 1, k, Sort[If[# - n >= k, Nothing, #]& /@ ReplacePart[l, j -> n]]], {j, 1, Length[l]}];
A[n_, k_] := b[n, Min[k, n - 1], {}];
Table[A[n, d - n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Apr 30 2018, after Alois P. Heinz *)
A287417
Number A(n,k) of set partitions of [n] such that all absolute differences between least elements of consecutive blocks and between consecutive elements within the blocks are not larger than k; square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
1, 1, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 2, 3, 0, 1, 1, 2, 5, 4, 0, 1, 1, 2, 5, 12, 5, 0, 1, 1, 2, 5, 15, 27, 6, 0, 1, 1, 2, 5, 15, 46, 58, 7, 0, 1, 1, 2, 5, 15, 52, 139, 121, 8, 0, 1, 1, 2, 5, 15, 52, 187, 410, 248, 9, 0, 1, 1, 2, 5, 15, 52, 203, 677, 1189, 503, 10, 0
Offset: 0
A(5,3) = 46 = 52 - 6 = A000110(5) - 6 counts all set partitions of [5] except: 1234|5, 15|234, 15|23|4, 15|24|3, 15|2|34, 15|2|3|4.
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, ...
0, 2, 2, 2, 2, 2, 2, 2, ...
0, 3, 5, 5, 5, 5, 5, 5, ...
0, 4, 12, 15, 15, 15, 15, 15, ...
0, 5, 27, 46, 52, 52, 52, 52, ...
0, 6, 58, 139, 187, 203, 203, 203, ...
0, 7, 121, 410, 677, 824, 877, 877, ...
-
b:= proc(n, k, l, t) option remember; `if`(n<1, 1, `if`(t-n>k, 0,
b(n-1, k, map(x-> `if`(x-n>=k, [][], x), [l[], n]), n)) +add(
b(n-1, k, sort(map(x-> `if`(x-n>=k, [][], x), subsop(j=n, l))),
`if`(t-n>k, infinity, t)), j=1..nops(l)))
end:
A:= (n, k)-> b(n, min(k, n-1), [], n):
seq(seq(A(n, d-n), n=0..d), d=0..14);
-
b[n_, k_, l_, t_] := b[n, k, l, t] = If[n < 1, 1, If[t - n > k, 0, b[n - 1, k, If[# - n >= k, Nothing, #]& /@ Append[l, n], n]] + Sum[b[n - 1, k, Sort[If[# - n >= k, Nothing, #]& /@ ReplacePart[l, j -> n]], If[t - n > k, Infinity, t]], {j, 1, Length[l]}]];
A[n_, k_] := b[n, Min[k, n - 1], {}, n];
Table[A[n, d - n], {d, 0, 14}, { n, 0, d}] // Flatten (* Jean-François Alcover, May 24 2018, translated from Maple *)
A287252
Number of set partitions of [n] such that all absolute differences between least elements of consecutive blocks are <= two.
Original entry on oeis.org
1, 1, 2, 5, 14, 44, 152, 571, 2317, 10096, 47013, 232944, 1223428, 6786936, 39640947, 243060305, 1560340480, 10461611439, 73094563140, 531127372268, 4006242743228, 31316162403165, 253292622192153, 2116823651781702, 18255325000268015, 162261535224570326
Offset: 0
-
b:= proc(n, k, m, l) option remember; `if`(n<1, 1,
`if`(l-n>k, 0, b(n-1, k, m+1, n))+m*b(n-1, k, m, l))
end:
a:= n-> b(n-1, min(2, n-1), 1, n):
seq(a(n), n=0..30);
-
b[n_, k_, m_, l_] := b[n, k, m, l] = If[n < 1, 1, If[l - n > k, 0, b[n - 1, k, m + 1, n]] + m*b[n - 1, k, m, l]];
a[n_] := b[n - 1, Min[2, n - 1], 1, n];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 28 2018, from Maple *)
A287253
Number of set partitions of [n] such that all absolute differences between least elements of consecutive blocks are <= three.
Original entry on oeis.org
1, 1, 2, 5, 15, 51, 191, 780, 3440, 16249, 81736, 435796, 2453100, 14529728, 90294625, 587256087, 3988153356, 28223370977, 207745253237, 1587804229045, 12581186077773, 103197641796678, 875085283793768, 7661468372063681, 69173450911547978, 643354845906697516
Offset: 0
A287254
Number of set partitions of [n] such that all absolute differences between least elements of consecutive blocks are <= four.
Original entry on oeis.org
1, 1, 2, 5, 15, 52, 202, 857, 3933, 19373, 101755, 566712, 3331349, 20592862, 133439286, 903926271, 6385918342, 46950260915, 358560107124, 2839638581291, 23285101241537, 197425160416845, 1728548417051752, 15610025975013920, 145242705457704688
Offset: 0
A287255
Number of set partitions of [n] such that all absolute differences between least elements of consecutive blocks are <= five.
Original entry on oeis.org
1, 1, 2, 5, 15, 52, 203, 876, 4104, 20666, 111075, 633704, 3819875, 24230302, 161175189, 1120918549, 8129696204, 61351621492, 480802257296, 3905922860317, 32839970931663, 285348575175351, 2559007785431183, 23657489230231038, 225209876301752325
Offset: 0
A287256
Number of set partitions of [n] such that all absolute differences between least elements of consecutive blocks are <= six.
Original entry on oeis.org
1, 1, 2, 5, 15, 52, 203, 877, 4139, 21079, 114784, 664100, 4062241, 26164323, 176828713, 1250185783, 9221588229, 70796614497, 564525137134, 4666694339977, 39927027760582, 353023213637306, 3221255985418911, 30296436876469140, 293363448567612910
Offset: 0
Showing 1-10 of 14 results.
Comments