OFFSET
1,2
COMMENTS
Number of solutions < 10^9 to k^n == k-1 (mod n): 1 (if k = 1), 188 (if k = 2, see A006521), 5 (if k = 3, see A015973), 5 (if k = 4, see this sequence), 5 (if k = 5), 10 (if k = 6), 10 (if k = 7), 7 (if k = 8), 5 (if k = 9), 8 (if k = 10), 11 (if k = 11), 8 (if k = 12), 9 (if k = 13), 4 (if k = 14), 3 (if k = 15), 6 (if k = 16), 7 (if k = 17), 7 (if k = 18), ...
a(9) > 10^15. - Max Alekseyev, Nov 10 2022
MATHEMATICA
Select[Range[10^7], IntegerQ[(PowerMod[4, #, # ]+3)/# ]&] (* Metin Sariyar, Sep 28 2019 *)
PROG
(Magma) [1] cat [n: n in [1..10^8] | Modexp(4, n, n) + 3 eq n];
(PARI) is(n)=Mod(4, n)^n==-3 \\ Charles R Greathouse IV, Sep 29 2019
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Juri-Stepan Gerasimov, Sep 27 2019
EXTENSIONS
a(6)-a(7) from Giovanni Resta, Sep 29 2019
a(8) from Max Alekseyev, Nov 10 2022
STATUS
approved