OFFSET
1,2
COMMENTS
EXAMPLE
10^2 mod 1 = 0 <> 1^2 mod 10 = 1,
10^2 mod 2 = 0 <> 2^2 mod 10 = 4,
10^2 mod 3 = 1 <> 3^2 mod 10 = 9,
10^2 mod 4 = 0 <> 4^2 mod 10 = 6,
10^2 mod 5 = 0 <> 5^2 mod 10 = 5,
10^2 mod 6 = 4 <> 6^2 mod 10 = 6,
10^2 mod 7 = 2 <> 7^2 mod 10 = 9,
10^2 mod 8 = 4 = 8^2 mod 10, therefore a(10) = 8.
MATHEMATICA
s={}; Do[m=0; Until[Mod[n^2, m]==Mod[m^2, n], m++]; AppendTo[s, m] , {n, 79}]; s (* James C. McMahon, Oct 27 2024 *)
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Reinhard Zumkeller, Sep 01 2006
STATUS
approved