OFFSET
1,1
COMMENTS
This sequence contains no primes. If p is a prime, and r is a primitive root of p, the numbers (r+j*p)^(r+j*p) for j = 1..p-1 include all residues of units mod p, and for p > 3, r+1 must be a unit.
The complete list of n such that k^k == k+1 (mod n) has no nonzero solutions is the union of A047229 and this sequence.
LINKS
Jean-François Alcover, Table of n, a(n) for n = 1..150
MATHEMATICA
A191833[n_] := (For[m = 2*n + 2*Floor[n/2] - 1; k = 1, k <= m^2, k++, If[PowerMod[k, k, m] == Mod[k+1, m], Return[{k, m}]]]; {0, m}); Reap[For[j = 1; n = 1, n <= 5000, n++, {z, m} = A191833[n]; If[z == 0, Print["a(", j++, ") = ", m]; Sow[m]]]][[2, 1]] (* Jean-François Alcover, Sep 13 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, Jun 17 2011
EXTENSIONS
Terms a(30) onward from Max Alekseyev, Sep 10 2013
STATUS
approved