login
A328201
a(n) is the smallest m > n such that m + n divides m^(m - n)*(m - n)^m + 1.
0
1, 2, 9, 8744, 8189, 19531249994, 731, 52, 1745, 26, 63, 1290, 10735, 38, 237, 214, 5417, 3722, 49, 452, 109, 2818, 45, 990, 227, 368, 47, 78704, 533, 342, 8437, 44, 11467, 134, 95, 368, 5077, 1886, 83, 68626, 89, 1964, 426398815, 1156636, 5719, 25334, 4835, 542
OFFSET
0,2
EXAMPLE
a(0) = 1 because 1 + 0 = 1 divides 0^(1 - 0)*(1 - 0)^0 + 1 = 1;
a(1) = 2 because 2 + 1 = 3 divides 2^(2 - 1)*(2 - 1)^2 + 1 = 3;
a(2) = 9 because 9 + 2 = 11 divides 9^(9 - 2)*(9 - 2)^9 + 1 = 4782969*40353607 + 1 = 193010051319184.
MATHEMATICA
a[5] = 19531249994; a[n_] := Block[{k = n + 1}, While[ Mod[ PowerMod[k, k-n, k+n] PowerMod[k-n, k, k+n] + 1, k+n] != 0, k++]; k]; a /@ Range[0, 40] (* Giovanni Resta, Oct 08 2019 *)
PROG
(PARI) a(n) = my(m=n+1); while ((m^(m - n)*(m - n)^m + 1) % (m+n), m++); m; \\ Michel Marcus, Oct 08 2019
CROSSREFS
Sequence in context: A175980 A296654 A027734 * A028581 A030252 A325624
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(5) and a(39)-a(47) from Giovanni Resta, Oct 08 2019
STATUS
approved