|
|
A015951
|
|
Numbers k such that k | 5^k + 1.
|
|
24
|
|
|
1, 2, 3, 9, 21, 26, 27, 63, 81, 147, 189, 243, 338, 441, 567, 609, 729, 903, 1029, 1323, 1378, 1701, 1827, 2187, 2667, 2709, 3087, 3969, 4263, 4394, 4401, 5103, 5481, 6321, 6561, 7203, 8001, 8127, 9261, 9429, 11907, 12789, 13149, 13203
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
MATHEMATICA
|
Select[Range[15000], PowerMod[5, #, #]==#-1&] (* Harvey P. Dale, Aug 11 2024 *)
|
|
PROG
|
(PARI) isok(n) = Mod(5, n)^n == -1; \\ Michel Marcus, Oct 11 2016
(Magma) [n: n in [1..10^5] | Modexp(5, n, n)+1 eq n]; // Jinyuan Wang, Dec 29 2018
(Python)
for n in range(1, 10**5):
if pow(5, n, n)+1 == n: print(n, end=', ') # Stefano Spezia, Dec 30 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,changed
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|