20080525, 16:18  #1 
7·13·83 Posts 
a^x=x (mod p)
Are there any results concerning the following problem: given p  prime, 1<a<p find 0=<x<p such that a^x = x (mod p)?

20080527, 02:42  #2 
Oct 2007
Manchester, UK
2·3·223 Posts 
There are 6 before you even enter double digits.
Code:
2^3 = 3 mod 5 3^2 = 2 mod 7 3^4 = 4 mod 7 3^5 = 5 mod 7 4^2 = 2 mod 7 4^4 = 4 mod 7 Code:
c=0; forprime(p=2,10, for(a=2,p, for(x=0,p, if(lift(Mod(a^x,p))==x, c++;print(a,"^",x," = ",x," mod ",p) ) ))); print(c); Edit: Limiting a and x to primes aswell produces 3 results with p<10, 12 with p<20, 101 with p<100 and 2750 with p<1000. Edit2: The highest result for p<1000 is 995^803 = 803 mod 997. Last fiddled with by lavalamp on 20080527 at 03:02 