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-10 of 14 results. Next

A165962 Number of circular permutations of length n without modular 3-sequences.

Original entry on oeis.org

1, 5, 18, 95, 600, 4307, 35168, 321609, 3257109, 36199762, 438126986, 5736774126, 80808984725, 1218563180295, 19587031966352, 334329804347219, 6039535339644630, 115118210694558105, 2308967760171049528, 48613722701436777455, 1072008447320752890459
Offset: 3

Views

Author

Isaac Lambert, Oct 01 2009

Keywords

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.

Examples

			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).
		

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

Crossrefs

First column of A216722. Cf. A216723. - N. J. A. Sloane, Sep 15 2012

Programs

  • 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 *)

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).

A002628 Number of permutations of length n without 3-sequences.

Original entry on oeis.org

1, 1, 2, 5, 21, 106, 643, 4547, 36696, 332769, 3349507, 37054436, 446867351, 5834728509, 82003113550, 1234297698757, 19809901558841, 337707109446702, 6094059760690035, 116052543892621951, 2325905946434516516, 48937614361477154273, 1078523843237914046247
Offset: 0

Views

Author

Keywords

Comments

a(n) = sum of row n of A180185. - Emeric Deutsch, Sep 06 2010

Examples

			a(4) = 21 because only 1234, 2341, and 4123 contain 3-sequences. - _Emeric Deutsch_, Sep 06 2010
		

References

  • Jackson, D. M.; Reilly, J. W. Permutations with a prescribed number of p-runs. Ars Combinatoria 1 (1976), number 1, 297-305.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column k=0 of A047921.
Cf. A165960, A165961, A165962. - Isaac Lambert, Oct 07 2009
Cf. A000166, A180185. - Emeric Deutsch, Sep 06 2010

Programs

  • Maple
    seq(coeff(convert(series(add(m!*((t-t^3)/(1-t^3))^m,m=0..50),t,50), polynom), t,n),n=0..25); # Pab Ter, Nov 06 2005
    d[-1]:= 0: for n from 0 to 51 do d[n] := n*d[n-1]+(-1)^n end do: a:= proc(n) add(binomial(n-k, k)*(d[n-k]+d[n-k-1]), k = 0..floor((1/2)*n)) end proc: seq(a(n), n = 0..25); # Emeric Deutsch, Sep 06 2010
    # third Maple program:
    a:= proc(n) option remember; `if`(n<5,
          [1$2, 2, 5, 21][n+1], (n-3)*a(n-1)+(3*n-6)*a(n-2)+
          (4*n-12)*a(n-3)+(3*n-12)*a(n-4)+(n-5)*a(n-5))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Jul 21 2019
  • Mathematica
    d[0] = 1; d[n_] := d[n] = n d[n - 1] + (-1)^n;
    T[n_, k_] := If[n == 0 && k == 0, 1, If[k <= n/2, Binomial[n - k, k] d[n + 1 - k]/(n - k), 0]];
    a[n_] := Sum[T[n, k], {k, 0, Quotient[n, 2]}];
    a /@ Range[0, 25] (* Jean-François Alcover, May 23 2020 *)

Formula

a(n) = Sum_{k=0..floor(n/2)} binomial(n-k,k)*(d(n-k) + d(n-k-1)) for n>0, where d(j) = A000166(j) are the derangement numbers. - Emeric Deutsch, Sep 06 2010

Extensions

More terms from Pab Ter (pabrlos2(AT)yahoo.com), Nov 06 2005
a(0)=1 prepended by Alois P. Heinz, Jul 21 2019

A174074 Number of circular permutations of length n without consecutive triples i,i+2,i+4.

Original entry on oeis.org

1, 1, 1, 2, 6, 22, 109, 657, 4625, 37186, 336336, 3379058, 37328103, 449669577, 5866178493, 82387080624, 1239364493118, 19881771085788, 338797668091565, 6111688544942463, 116354993433563797, 2331395107113471188, 49042688584011866880, 1080639600739277669092, 24891049832682424745839
Offset: 0

Views

Author

Isaac Lambert, Mar 06 2010

Keywords

Comments

Circular permutations are permutations whose indices are from the ring of integers modulo n.

Examples

			Since a(5)=22, there are (5-1)!-22=2 circular permutations with consecutive triples i,i+2,i+4 in all circular permutations of length 5. They are exactly (0,2,4,1,3) and (0,2,4,3,1).
		

References

  • Wayne M. Dymacek, Isaac Lambert and Kyle Parsons, Arithmetic Progressions in Permutations, http://math.ku.edu/~ilambert/CN.pdf, 2012.

Crossrefs

Column 1 of A216719.

Extensions

a(10)-a(15) from Donovan Johnson, Sep 24 2010
a(0)-a(2) prepended and terms a(16) onward added by Max Alekseyev, Feb 04 2024

A235943 Number a(n,k) of positions (cyclic permutations) of circular permutations of [n] with exactly k (unspecified) increasing or decreasing modular runs (3-sequences), with clockwise and counterclockwise traversals counted as distinct; triangle a(n,k) read by rows, 0<=k<=n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 16, 0, 0, 0, 8, 60, 50, 0, 0, 0, 10, 456, 144, 108, 0, 0, 0, 12, 3458, 1078, 294, 196, 0, 0, 0, 14, 29296, 7936, 2240, 512, 320, 0, 0, 0, 16, 275166, 66096, 16200, 4104, 810, 486, 0, 0, 0, 18, 2843980, 611200, 135600, 29200, 6900, 1200, 700, 0, 0, 0, 20
Offset: 0

Views

Author

Paul J. Campbell, Jan 20 2014, with Joe Marasco and Ashish Vikram

Keywords

Comments

Arrangements that differ in the direction in which the cycle is traversed count as different.

References

  • Paul J. Campbell, Circular permutations with exactly one modular run (3-sequence), submitted to Journal of Integer Sequences

Crossrefs

A216718 Triangle read by rows: number of circular permutations of [1..n] with k progressions of rise 1, distance 1 and length 3 (n >= 3, k >= 0).

Original entry on oeis.org

1, 1, 1, 5, 0, 1, 20, 3, 0, 1, 102, 14, 3, 0, 1, 627, 72, 17, 3, 0, 1, 4461, 468, 87, 20, 3, 0, 1, 36155, 3453, 582, 103, 23, 3, 0, 1, 328849, 28782, 4395, 704, 120, 26, 3, 0, 1, 3317272, 267831, 37257, 5435, 834, 138, 29, 3, 0, 1
Offset: 2

Views

Author

N. J. A. Sloane, Sep 15 2012

Keywords

Examples

			Triangle begins:
        1;
        1,      1; [this is row n=3]
        5,      0,     1;
       20,      3,     0,    1;
      102,     14,     3,    0,   1;
      627,     72,    17,    3,   0,   1;
     4461,    468,    87,   20,   3,   0,  1;
    36155,   3453,   582,  103,  23,   3,  0, 1;
   328849,  28782,  4395,  704, 120,  26,  3, 0, 1;
  3317272, 267831, 37257, 5435, 834, 138, 29, 3, 0, 1;
  ...
		

References

  • Wayne M. Dymacek, Isaac Lambert and Kyle Parsons, Arithmetic Progressions in Permutations, http://math.ku.edu/~ilambert/CN.pdf, 2012.

Crossrefs

Extensions

a(2,0)=1 added by N. J. A. Sloane, Apr 16 2021

A235937 Number of circular permutations with exactly one specified increasing or decreasing modular run (3-sequence), with clockwise and counterclockwise traversals not counted as distinct.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 11, 62, 408, 3056, 25821, 242802, 2517303, 28540102, 351383192, 4669815008, 66640974977, 1016522211474, 16507095990251, 284343231536742, 5178919228252440
Offset: 1

Views

Author

Paul J. Campbell, Jan 20 2014, with Joe Marasco and Ashish Vikram

Keywords

Comments

Arrangements that differ only in the direction in which the cycle is traversed do not count as different.
This sequence is the same as for straight permutations of {0,1,...,n} that begin with {0,1} and end with {n-1,n} but have no increasing or decreasing 3-sequence, viz., the sequence b(0,1...n-2,n-1) in Dymáček and Lambert.

Examples

			With specified sequence 123:
a(5) = 1: 12354.
a(6) = 2: 123564, 123645.
a(7) = 11: 1235476, 1235746, 1235764, 1236475, 1236574, 1236745, 1236754, 1237465, 1237546, 1237564, 1237645.
		

References

  • Paul J. Campbell, Circular permutations with exactly one modular run (3-sequence), submitted to Journal of Integer Sequences

Crossrefs

Extensions

a(20)-a(21) from Alois P. Heinz, Jan 24 2014
Obsolete b-file deleted by N. J. A. Sloane, Jan 05 2019

A235938 Number of circular permutations with exactly one specified increasing or decreasing modular run (3-sequence), with clockwise and counterclockwise traversals counted as distinct.

Original entry on oeis.org

0, 0, 0, 0, 2, 4, 22, 124, 816, 6112, 51642, 485604, 5034606, 57080204, 702766384, 9339630016, 133281949954, 2033044422948, 33014191980502, 568686463073484, 10357838456504880
Offset: 1

Views

Author

Paul J. Campbell, Jan 20 2014, with Joe Marasco and Ashish Vikram

Keywords

Examples

			With specified sequence 123:
a(5) = 2: 12354, 32154.
a(6) = 4: 123564, 321564, 123645, 321546.
		

References

  • Paul J. Campbell, Circular permutations with exactly one modular run (3-sequence), submitted to Journal of Integer Sequences

Crossrefs

Formula

a(n) = 2*A235937(n).

Extensions

a(20)-a(21) from Alois P. Heinz, Jan 24 2014
Obsolete b-file deleted by N. J. A. Sloane, Jan 05 2019

A235939 Number of circular permutations with exactly one (unspecified) increasing or decreasing modular 3-sequence, with clockwise and counterclockwise traversals not counted as distinct.

Original entry on oeis.org

0, 0, 0, 0, 5, 12, 77, 496, 3672, 30560, 284031, 2913624, 32724939, 399561428, 5270747880, 74717040128, 1132896574609, 18297399806532, 313634823814769, 5686864630734840, 108757303793301240
Offset: 1

Views

Author

Paul J. Campbell, Jan 20 2014, with Joe Marasco and Ashish Vikram

Keywords

Comments

Arrangements that differ only in the direction in which the cycle is traversed do not count as different.

Examples

			a(5) = 5: 12354, 23415, 34521, 45132, 51243.
		

References

  • Paul J. Campbell, Circular permutations with exactly one modular run (3-sequence), submitted to Journal of Integer Sequences

Crossrefs

Formula

a(n) = n*A235937(n).

Extensions

a(20)-a(21) from Alois P. Heinz, Jan 24 2014
Obsolete b-file deleted by N. J. A. Sloane, Jan 05 2019

A235940 Number of circular permutations with exactly one (unspecified) increasing or decreasing modular 3-sequence, with clockwise and counterclockwise traversals counted as distinct.

Original entry on oeis.org

0, 0, 0, 0, 10, 24, 154, 992, 7344, 61120, 568062, 5827248, 65449878, 799122856, 10541495760, 149434080256, 2265793149218, 36594799613064, 627269647629538, 11373729261469680, 217514607586602480
Offset: 1

Views

Author

Paul J. Campbell, Jan 20 2014, with Joe Marasco and Ashish Vikram

Keywords

References

  • Paul J. Campbell, Circular permutations with exactly one modular run (3-sequence), submitted to Journal of Integer Sequences.

Crossrefs

Formula

a(n) = 2n*A235937(n).
a(n) = n*A235938(n).
a(n) = 2*A235939(n).

Extensions

a(20)-a(21) added using the data at A235939 by Amiram Eldar, May 06 2024

A235941 Positions (cyclic permutations) of circular permutations with exactly one (unspecified) increasing or decreasing modular 3-sequence, with clockwise and counterclockwise traversals not counted as distinct.

Original entry on oeis.org

0, 0, 0, 0, 25, 72, 539, 3968, 33048, 305600, 3124341, 34963488, 425424207, 5593859992, 79061218200, 1195472642048, 19259241768353, 329353196517576, 5959061652480611, 113737292614696800, 2283903379659326040
Offset: 1

Views

Author

Paul J. Campbell, Jan 20 2014, with Joe Marasco and Ashish Vikram

Keywords

References

  • Paul J. Campbell, Circular permutations with exactly one modular run (3-sequence), submitted to Journal of Integer Sequences

Crossrefs

Formula

a(n) = n^2 * A235937(n).
a(n) = n * A235939(n).

Extensions

a(20)-a(21) from Alois P. Heinz, Jan 24 2014
Obsolete b-file deleted by N. J. A. Sloane, Jan 05 2019
Showing 1-10 of 14 results. Next