Take the 2-minute tour ×
MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.

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|improve this question

1 Answer 1

See https://oeis.org/A002326 and references there.

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