This site is supported by donations to The OEIS Foundation.



Annual Appeal: Please make a donation to keep the OEIS running. In 2018 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS").
Other ways to donate

(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A226593 Period of longest sequence generated by recursive permutation of permutation pairs of length n. 1
1, 3, 8, 18, 96, 216 (list; graph; refs; listen; history; text; internal format)



The n! permutations (p) of the numbers 1,2,3..n may be paired (allowing duplication) in n!^2 ways. Let p’ represent a permutation of the identity 123..n: then in p x p’ = p’’, p’ will (by x) permute p (in the same way the identity was permuted) to p’’. For example, 2143 x 4321 = 3412. Iterating, 4321 x 3412 = 2143 for a period of 3. If p = p’, this recursive process gives the Pisano periods. For most other pairings the periods are of different lengths. The sequence gives the longest period that p x p’ generates for any p of length n.


Table of n, a(n) for n=1..6.

Russell Walsmith, An investigation of recursive sequences based on pairs of permutations of length n.


For n = 4: 3142 x 2341 = 1423; 2341 x 1423 = 2134... the sequence thus generated is of period = 18.


(PARI) period(a, b)=my(n=matsize(a)[2], v=vector(n), aa=vector(n, i, a[i]), bb=vector(n, i, b[i]), id, nsteps); while(id!=n, for(i=1, n, v[i]=a[b[i]]); id=sum(i=1, n, b[i]==aa[i] && v[i]==bb[i]); for(i=1, n, a[i]=b[i]; b[i]=v[i]); nsteps++); nsteps

a(n)=my(a, b, m, p); for(k=1, n!, a=numtoperm(n, k); for(l=1, n!, b=numtoperm(n, l); p=period(a, b); if(p>m, m=p))); m \\ Ralf Stephan, Aug 13 2013


Cf. A001175 (Pisano periods: period of Fibonacci numbers (A000045) mod n).

Cf. A106291 (period of the Lucas sequence (A000032) mod n).

Sequence in context: A110045 A108931 A032100 * A023371 A124086 A091109

Adjacent sequences:  A226590 A226591 A226592 * A226594 A226595 A226596




Russell Walsmith, Jun 13 2013


a(6) from Ralf Stephan, Aug 13 2013



Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 13 12:49 EST 2018. Contains 318086 sequences. (Running on oeis4.)