OFFSET
1,1
COMMENTS
A majority of numbers k satisfies the equation n^k (mod 2k+1) = k^n (mod 2n+1) = r = 1.
The values of n such that r <> 1 are given by n = 17, 38, 42, 47, 57, 59, …including the values with r = 0 given by n = 62, 84, 171, …
EXAMPLE
a(5) = 9 because 5^9 (mod 19) = 9^5 (mod 11) = 1;
a(17) = 5 because 17^5 (mod 11) = 5^17 (mod 35) = 10;
a(62) = 15 because 62^15 (mod 31) = 15^62 (mod 125) = 0.
MAPLE
with(numtheory): for n from 1 to 100 do:ii:=0:for k from 1 to 10000 while(ii=0) do:if n<>k and irem(n^k, 2*k+1) = irem(k^n, 2*n+1) then ii:=1:printf(`%d, `, k):else fi:od:od:
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Mar 30 2012
STATUS
approved