OFFSET
1,2
COMMENTS
a(15) > 10^19.
a(16) = 29623979969.
a(17) = 250.
a(19) = 13915.
a(15) <= 76717223012242243155874. - Jinyuan Wang, Mar 25 2020
From Jon E. Schoenfield, Aug 28 2021: (Start)
a(18) = 16983563041.
Next 20 terms after the first unknown term (a(15)): 29623979969, 250, 16983563041, 13915, 1143, 23426, 5608987, 2187, 75625, 25160213, 2709, 26803, a(28), 729, a(30), 2702258, 6633, 118810, 15625, 6379479. (End)
FORMULA
a(n) = A333429(n,n).
PROG
(PARI) a(n) = {my(c=0, m=0); while(c<n, m++; if(Mod(n, m)^m==-1, c++)); m; } \\ Jinyuan Wang, Mar 25 2020
(Python)
def a(n):
if n == 1: return 1
m = 0
for c in range(1, n+1):
m += 1
while not (pow(n, m, m) + 1)%m == 0: m += 1
return m
print([a(n) for n in range(1, 15)]) # Michael S. Branicky, Aug 28 2021
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Alois P. Heinz, Mar 20 2020
STATUS
approved