MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

permutation is given by f(i) = 2i if i<=n and 2(i-n)-1 if i>n

where i denotes the position of cards. eg pack of cards (1,2,3,4)-->(3,1,4,2)

Basically trying to find the multiplicative order of 2 mod(2n+1) got pretty far with for special cases such as 2n+1 being prime.

if 2n+1 = 2^k+1 then order = 2k

if 2n+1 = 2^k-1 then order = k

if 2n+1 = 2m+1 where m prime and m=3(mod4) then order = m

i thought the rest would have order = 2n by fermats little theoram but when 2n+1=103 this is not the case (it has order 51)

any help would be much appreciated

share|cite|improve this question

See and references there.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.