A213382 Numbers n such that n^n mod (n + 2) = n.
1, 4, 7, 13, 16, 19, 31, 37, 49, 55, 61, 67, 85, 91, 109, 121, 127, 139, 157, 175, 181, 193, 196, 199, 211, 217, 235, 247, 265, 289, 301, 307, 313, 319, 325, 337, 379, 391, 397, 409, 415, 445, 451, 469, 487, 499, 517, 535, 541, 571, 577, 589, 595, 631, 667, 679
Offset: 1
Keywords
Examples
A213381(n) = 7^7 mod 9 = 7, so 7 is in the sequence.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Select[Range[700],PowerMod[#,#,#+2]==#&] (* Harvey P. Dale, Oct 03 2015 *)
-
PARI
is(n)=Mod(n,n+2)^n==n \\ Charles R Greathouse IV, Sep 12 2012
-
Python
for n in range(999): x = n**n % (n+2) if x==n: print(n, end=", ")
Comments