OFFSET
1,1
COMMENTS
k > 1 is needed in the definition as n+1 divides n^n+1 for all odd n. - Chai Wah Wu, Jun 04 2021
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
MATHEMATICA
a[n_] := Module[{k = 2}, While[! Divisible[n^n + k, n + k], k++]; k]; Array[a, 100, 3] (* Amiram Eldar, Jun 04 2021 *)
PROG
(PARI) a(n) = if(n==2, 0, my(k=2); while((n^n+k)%(n+k)!=0, k++); k);
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jun 04 2021
STATUS
approved