OFFSET
1,1
COMMENTS
All odd numbers have k^k == k (mod k + 1), but only some have other solutions in the least residue system (e.g. 3^27 and 19^27 == 27 (mod 28)).
Odd numbers k such that k and A000010(k+1) are not coprime. - Robert Israel, Jul 30 2023
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Robert Israel et al, Even k such that x^k == -1 mod k has solutions
EXAMPLE
27 is in the list because x^27 == 27 (mod 28) has three solutions: 3, 19, and 27.
MAPLE
select(t -> igcd(t, numtheory:-phi(t+1))>1, [seq(i, i=1..1000, 2)]); # Robert Israel, Jul 30 2023
MATHEMATICA
ok[k_] := Length[Select[Range[0, k-1], PowerMod[#, k, k + 1] == k &, 2]] > 1; Select[ Range@ 600, ok] (* Giovanni Resta, Dec 10 2019 *)
PROG
(PARI) isok(k) = sum(i=0, k-1, Mod(i, k+1)^k == k) > 1; \\ Michel Marcus, Dec 10 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Christopher Cormier, Dec 09 2019
STATUS
approved