[go: up one dir, main page]

login
Search: a002628 -id:a002628
     Sort: relevance | references | number | modified | created      Format: long | short | data
Number of circular permutations of length n without 3-sequences.
+10
15
1, 5, 20, 102, 627, 4461, 36155, 328849, 3317272, 36757822, 443846693, 5800991345, 81593004021, 1228906816941, 19733699436636, 336554404751966, 6075478765948135, 115734570482611885, 2320148441078578447, 48827637296350480457, 1076313671861962141616
OFFSET
3,2
COMMENTS
Circular permutations are permutations whose indices are from the ring of integers modulo n. 3-sequences are of the form i,i+1,i+2. Sequence gives number of permutations of [n] starting with 1 and having no 3-sequences.
a(n) is also the number of permutations of length n-1 without consecutive fixed points (cf. A180187). - David Scambler, Mar 27 2011
REFERENCES
Wayne M. Dymacek, Isaac Lambert and Kyle Parsons, Arithmetic Progressions in Permutations, http://math.ku.edu/~ilambert/CN.pdf, 2012. - From N. J. A. Sloane, Sep 15 2012 [broken link]
LINKS
Wayne M. Dymacek and Isaac Lambert, Permutations Avoiding Runs of i, i+1, i+2 or i, i-1, i-2, Journal of Integer Sequences, Vol. 14 (2011), Article 11.1.6.
Kyle Parsons, Arithmetic progressions in permutations, Thesis, 2011.
FORMULA
Let b(n) be the sequence A002628. Then for n > 5, this sequence satisfies a(n) = b(n-1) - b(n-3) + a(n-3).
a(n) = Sum_{k=0..n/2} binomial(n-k,k)*d(n-k-1), where d(j)=A000166(j) are the derangement numbers. - Emeric Deutsch, Sep 07 2010
EXAMPLE
For n=4 the a(4)=5 solutions are (0,1,3,2), (0,2,1,3), (0,2,3,1), (0,3,1,2) and (0,3,2,1).
MAPLE
d[0] := 1: for n to 51 do d[n] := n*d[n-1]+(-1)^n end do: a := proc (n) options operator, arrow: sum(binomial(n-k, k)*d[n-k-1], k = 0 .. floor((1/2)*n)) end proc: seq(a(n), n = 3 .. 23); # Emeric Deutsch, Sep 07 2010
MATHEMATICA
a[n_] := Sum[Binomial[n-k, k] Subfactorial[n-k-1], {k, 0, n/2}];
a /@ Range[3, 21] (* Jean-François Alcover, Oct 29 2019 *)
CROSSREFS
Cf. A000166, A180186, - Emeric Deutsch, Sep 07 2010
A column of A216718. - N. J. A. Sloane, Sep 15 2012
KEYWORD
nonn
AUTHOR
Isaac Lambert, Oct 01 2009
EXTENSIONS
More terms from Emeric Deutsch, Sep 07 2010
Edited by N. J. A. Sloane, Apr 04 2011
STATUS
approved
Number of circular permutations of length n without modular 3-sequences
+10
15
1, 5, 18, 95, 600, 4307, 35168, 321609, 3257109, 36199762, 438126986, 5736774126, 80808984725, 1218563180295, 19587031966352, 334329804347219, 6039535339644630, 115118210694558105, 2308967760171049528, 48613722701436777455, 1072008447320752890459
OFFSET
3,2
COMMENTS
Circular permutations are permutations whose indices are from the ring of integers modulo n. Modular 3-sequences are of the following form: i,i+1,i+2, where arithmetic is modulo n.
REFERENCES
Wayne M. Dymacek, Isaac Lambert and Kyle Parsons, Arithmetic Progressions in Permutations, http://math.ku.edu/~ilambert/CN.pdf, 2012. - N. J. A. Sloane, Sep 15 2012
LINKS
FORMULA
This sequence can be related to A165961 by the use of auxiliary sequences (and the auxiliary sequences can themselves be calculated by recurrence relations).
EXAMPLE
For n=4 the a(4)=5 solutions are (0,1,3,2), (0,2,1,3), (0,2,3,1), (0,3,1,2) and (0,3,2,1).
MATHEMATICA
f[i_, n_, k_]:=If[i==0&&k==0, 1, If[i==n&&n==k, 1, Binomial[k-1, k-i]*Binomial[n-k-1, k-i-1]+2*Binomial[k-1, k-i-1]*Binomial[n-k-1, k-i-1]+Binomial[k-1, k-i-1]*Binomial[n-k-1, k-i]]];
w1[i_, n_, k_]:=If[n-2k+i<0, 0, If[n-2k+i==0, 1, (n-2k+i-1)!]];
a[n_, k_]:=Sum[f[i, n, k]*w1[i, n, k], {i, 0, k}];
A165962[n_]:=(n-1)!+Sum[(-1)^k*a[n, k], {k, 1, n}];
Table[A165962[n], {n, 3, 23}] (* David Scambler, Sep 18 2012 *)
CROSSREFS
First column of A216722. Cf. A216723. - N. J. A. Sloane, Sep 15 2012
KEYWORD
nonn
AUTHOR
Isaac Lambert, Oct 01 2009
STATUS
approved
Number of permutations of length n with no consecutive triples i,i+2,i+4.
+10
9
1, 1, 2, 6, 24, 114, 674, 4714, 37754, 340404, 3412176, 37631268, 452745470, 5900431012, 82802497682, 1244815252434, 19958707407096, 339960096280062, 6130407887839754, 116675071758609742, 2337186717333367706, 49153251967227002616, 1082860432463176004544
OFFSET
0,3
COMMENTS
Note for n<5 there are no such subsequences, so those values are trivially n!.
LINKS
Wayne M. Dymacek, Isaac Lambert and Kyle Parsons, Arithmetic Progressions in Permutations, 2012. [broken link]
EXAMPLE
For n=5 (0,2,4,1,3) is an example of a permutation with an i,i+2,i+4 triple. If we look at 0,2,4 as a block, then we have 3! ways to permute the triple with the remaining 1 & 3. Hence a(5) = 5! - 3! = 114.
MAPLE
b:= proc(s, x, y) option remember; `if`(s={}, 1, add(
`if`(x=0 or x-y<>2 or y-j<>2, b(s minus {j}, y, j), 0), j=s))
end:
a:= n-> b({$1..n}, 0$2):
seq(a(n), n=0..14); # Alois P. Heinz, Apr 13 2021
MATHEMATICA
b[s_, x_, y_] := b[s, x, y] = If[s == {}, 1, Sum[
If[x == 0 || x - y != 2 || y - j != 2,
b[s ~Complement~ {j}, y, j], 0], {j, s}]];
a[n_] := b[Range[n], 0, 0];
Table[a[n], {n, 0, 14}] (* Jean-François Alcover, Mar 02 2022, after Alois P. Heinz *)
CROSSREFS
First column of A216716.
KEYWORD
nonn
AUTHOR
Isaac Lambert, Mar 06 2010
EXTENSIONS
a(0)-a(4) and a(10)-a(11) moved from a duplicate entry based on the Dymacek et al. paper on Apr 13 2021
a(12)-a(22) from Alois P. Heinz, Apr 13 2021
STATUS
approved
Number of permutations of length n without modular 3-sequences.
+10
5
1, 1, 2, 3, 20, 100, 612, 4389, 35688, 325395, 3288490, 36489992, 441093864, 5770007009, 81213878830, 1223895060315, 19662509071056, 335472890422812, 6057979285535388, 115434096553014565, 2314691409652237700, 48723117262650147387, 1074208020519710570054
OFFSET
0,3
COMMENTS
Modular 3-sequences are of the following form: i,i+1,i+2, where arithmetic is modulo n.
LINKS
FORMULA
a(n) = n * A165961(n).
EXAMPLE
For n=3 the a(3) = 3 solutions are (0,2,1), (1,0,2) and (2,1,0).
CROSSREFS
KEYWORD
nonn
AUTHOR
Isaac Lambert, Oct 01 2009
EXTENSIONS
a(0)-a(2) and a(15)-a(22) from Alois P. Heinz, Apr 14 2021
STATUS
approved
Number of permutations of length n with no consecutive triples i,i+d,i+2d for all d>0.
+10
5
1, 1, 2, 5, 21, 100, 597, 4113, 32842, 292379, 2925367, 31983248, 383514347, 4966286235, 69508102006, 1039315462467, 16627618496319, 282023014602100, 5075216962675445, 96263599713301975, 1925002914124917950
OFFSET
0,3
EXAMPLE
For n=4, there are 4!-a(4)=3 permutations with some consecutive triple i,i+d,i+2d. Note for n=4, only d=1 applies. Hence those three permutations are (0,1,2,3), (1,2,3,0), and (3,0,1,2). Since here only d=1, this is the same value of a(4) in A002628.
MAPLE
b:= proc(s, x, y) option remember; `if`(s={}, 1, add(
`if`(x=0 or x<y or x-y<>y-j,
b(s minus {j}, y, j), 0), j=s))
end:
a:= n-> b({$1..n}, 0$2):
seq(a(n), n=0..14); # Alois P. Heinz, Apr 13 2021
MATHEMATICA
b[s_, x_, y_] := b[s, x, y] = If[s == {}, 1, Sum[If[x == 0 || x < y || x-y != y-j, b[s~Complement~{j}, y, j], 0], {j, s}]];
a[n_] := b[Range[n], 0, 0];
Table[a[n], {n, 0, 14}] (* Jean-François Alcover, Sep 27 2022, after Alois P. Heinz *)
KEYWORD
nonn,more
AUTHOR
Isaac Lambert, Mar 15 2010
EXTENSIONS
a(0)-a(3) and a(10)-a(20) from Alois P. Heinz, Apr 13 2021
STATUS
approved
Triangle of numbers a(n,k) = number of permutations on n letters containing k 3-sequences (n >= 0, 0<=k<=max(0,n-2)).
+10
4
1, 1, 2, 5, 1, 21, 2, 1, 106, 11, 2, 1, 643, 62, 12, 2, 1, 4547, 406, 71, 13, 2, 1, 36696, 3046, 481, 80, 14, 2, 1, 332769, 25737, 3708, 559, 89, 15, 2, 1, 3349507, 242094, 32028, 4414, 640, 98, 16, 2, 1, 37054436, 2510733, 306723, 38893, 5164, 724, 107, 17, 2, 1
OFFSET
0,3
LINKS
J. Riordan, Permutations without 3-sequences, Bull. Amer. Math. Soc., 51 (1945), 745-748.
FORMULA
Riordan gives a recurrence.
EXAMPLE
Triangle begins:
1;
1;
2;
5, 1;
21, 2, 1;
106, 11, 2, 1;
643, 62, 12, 2, 1;
4547, 406, 71, 13, 2, 1;
36696, 3046, 481, 80, 14, 2, 1;
332769, 25737, 3708, 559, 89, 15, 2, 1;
...
CROSSREFS
Columns give A002628, A002629, A002630.
Row sums give A000142.
KEYWORD
nonn,tabf,nice,easy
EXTENSIONS
Edited and extended by Max Alekseyev, Sep 05 2010
a(0,0) = a(1,0) = 1 prepended by Alois P. Heinz, Apr 20 2021
STATUS
approved
Number of permutations of [n] having no substring [k,k+1,k+2,k+3].
+10
4
1, 1, 2, 6, 23, 117, 706, 4962, 39817, 359171, 3597936, 39630372, 476066277, 6194080387, 86776390796, 1302376048620, 20847721870931, 354549730559949, 6384006047649910, 121330369923079290, 2427196999663678987, 50981866833670160201, 1121806937829102793662
OFFSET
0,3
LINKS
D. M. Jackson and R. C. Read, A note on permutations without runs of given length, Aequationes Math. 17 (1978), no. 2-3, 336-343.
FORMULA
G.f.: Sum_{n>=0} n!*((x^m-x)/(x^m-1))^n where m = 4.
a(n) ~ n! * (1 - 1/n^2 + 1/n^3 + 9/(2*n^4) + 7/n^5 - 55/(6*n^6) - 114/n^7 - 11419/(24*n^8) - 970/n^9 + 345199/(120*n^10) + ...). - Vaclav Kotesovec, Feb 17 2024
PROG
(PARI) seq(n)={Vec(sum(k=0, n, k!*((x^4-x)/(x^4-1) + O(x*x^n))^k))} \\ Andrew Howroyd, Aug 31 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Ivana Jovovic (ivana121(AT)EUnet.yu), Nov 14 2007
EXTENSIONS
Terms a(16) and beyond from Andrew Howroyd, Aug 31 2018
STATUS
approved
Number of permutations of length n with no consecutive triples i,...i+r,...i+2r for all r, and for all equal spacings d.
+10
3
21, 94, 544, 3509, 26799, 223123
OFFSET
4,1
COMMENTS
Here we count both the sequence 1,2,3 (r=1) as a progression in 1,2,3,0,4,5, (note d=1) and in 1,0,2,4,3,5 (here, d=2).
EXAMPLE
For n=4 there are 4!-a(4)=3 with some progression. These are (0,1,2,3), (1,2,3,0), and (3,0,1,2). Here for all the progressions, r=1 and d=1, hence this term is the same as a(4) in A002628.
CROSSREFS
KEYWORD
nonn
AUTHOR
Isaac Lambert, Apr 20 2010
STATUS
approved
Number of permutations of [n] whose longest block is of length 2. A block of a permutation is a maximal sequence of consecutive integers which appear in consecutive positions.
+10
3
0, 0, 1, 2, 10, 53, 334, 2428, 20009, 184440, 1881050, 21034905, 255967940, 3367720736, 47641219569, 721160081974, 11631770791362, 199159952915293, 3607908007376418, 68946510671942892, 1386140583681969289, 29247292475233307612, 646231776371742321826
OFFSET
0,4
LINKS
FORMULA
a(n) = A002628(n) - A000255(n-1).
G.f.: Sum_{k>=0} k! * x^k * ( ((1-x^2)/(1-x^3))^k - ((1-x)/(1-x^2))^k ).
PROG
(PARI) my(N=30, x='x+O('x^N)); concat([0, 0], Vec(sum(k=0, N, k!*x^k*(((1-x^2)/(1-x^3))^k-((1-x)/(1-x^2))^k))))
CROSSREFS
Column k=2 of A184182.
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Feb 17 2024
STATUS
approved
Number of permutations of [n] having no substring [k,k+1,k+2,k+3,k+4].
+10
2
1, 1, 2, 6, 24, 119, 717, 5026, 40242, 362376, 3625081, 39885851, 478714416, 6224078292, 87145277160, 1307271652917, 20917481850667, 355612235468396, 6401234296266540, 121626707638142280, 2432586885636105251, 51085230669413519349, 1123891538655073251190
OFFSET
0,3
LINKS
D. M. Jackson and R. C. Read, A note on permutations without runs of given length, Aequationes Math. 17 (1978), no. 2-3, 336-343.
FORMULA
G.f.: Sum_{k>=0} k! * ( (x-x^5)/(1-x^5) )^k.
a(n) = Sum_{k=0..4} A184182(n,k). - Alois P. Heinz, Feb 17 2024
PROG
(PARI) my(N=30, x='x+O('x^N)); Vec(sum(k=0, N, k!*((x-x^5)/(1-x^5))^k))
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Feb 17 2024
STATUS
approved

Search completed in 0.014 seconds