A129847 a(n) = number of set partitions of {1, 2, ..., n} whose blocks consist only of elements that differ by two or less (that is, have only the forms {i}, {i,i+1}, {i,i+2}, or {i,i+1,i+2}).
1, 1, 2, 5, 10, 20, 42, 87, 179, 370, 765, 1580, 3264, 6744, 13933, 28785, 59470, 122865, 253838, 524428, 1083466, 2238435, 4624595, 9554390, 19739321, 40781336, 84254032, 174068400, 359624425, 742982225, 1534997482, 3171296957, 6551883314, 13536157460
Offset: 0
Examples
a(4) = 10, with set partitions {{1},{2},{3}, {4}}; {{1,2}, {3}, {4}}; {{1,3}, {2}, {4}}; {{1}, {2,3}, {4}}; {{1}, {2,4}, {3}}; {{1}, {2}, {3,4}}; {{1,2,3}, {4}}; {{1}, {2,3,4}}; {{1,2}, {3,4}} and {{1,3}, {2,4}}.
References
- Herbert S. Wilf, Generatingfunctiononogy (2nd Edition), Academic Press 1990, pp. 1 - 10 and pp. 20 - 23.
- Arthur T. Benjamin and Jennifer J. Quinn, Proofs that Really Count, Dolciani Mathematical Expositions (MAA), (2003), p. 1. (A relevant combinatorial interpretation of Fibonacci numbers.)
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- Kassie Archer, Ethan Borsh, Jensen Bridges, Christina Graves, and Millie Jeske, Cyclic permutations avoiding patterns in both one-line and cycle forms, arXiv:2312.05145 [math.CO], 2023. See p. 2.
- B. Duncan and R. Peele, Bell and Stirling numbers for graphs, JIS 12 (2009), Article 09.7.1.
- W. Kuszmaul, Fast Algorithms for Finding Pattern Avoiders and Counting Pattern Occurrences in Permutations, arXiv preprint arXiv:1509.08216 [cs.DM], 2015.
- W. Kuszmaul, Fast Algorithms for Finding Pattern Avoiders and Counting Pattern Occurrences in Permutations, Mathematics of Computation 87 (2018), 987-1011.
Programs
-
Maple
a:= n-> (<<0|1|0|0>, <0|0|1|0>, <0|0|0|1>, <1|2|1|1>>^n)[4, 4]: seq(a(n), n=0..35); # Alois P. Heinz, Sep 15 2016
-
Mathematica
a[1] = 1; a[2] = 2; a[3] = 5; a[4] = 10 a[n_] := a[n] = a[n-1] + a[n-2] + 2 a[n-3] + a[n-4] Table[a[n],{n,1,30}]
Formula
a(n) = the integer nearest to s r^n, where r = 2.0659948920 ... and s = 0.53979687305... . (More information in comment (2).)
a(n) = Sum_{k=0..floor(n/2)} Sum_{j=0..n-2k} C(n-j-k,k)*C(2k,j). - Paul Barry, Mar 24 2009
G.f.: 1/(1 - x - x^2 - 2*x^3 - x^4). - Colin Barker, May 02 2012
a(n) = a(n-1) + a(n-2) + 2*(n-3) + a(n-4) with a(0) = a(1) = 1, a(2) = 2, a(3) = 5. - Taras Goy, Aug 04 2017
a(2*n) = a(n)^2 - a(n-1)^2 + a(n-2)^2 + 2*a(n-1)*(a(n+1)-a(n)). - Greg Dresden, Jul 03 2024
Extensions
a(0)=1 prepended by Alois P. Heinz, Sep 15 2016
Comments