OFFSET
1,1
COMMENTS
Records: 341, 1105, 1729, 29341, 162401, 252601, 1152271, 2508013, 3828001, 6733693, 17098369, 17236801, 29111881, 82929001, 172947529, 216821881, 228842209, 366652201, .... - Robert G. Wilson v, May 11 2012
Conjecture: for n > 1, a(n) is the smallest Carmichael number k with lpf(k) > prime(n). It seems that such Carmichael numbers have exactly three prime factors. - Thomas Ordowski, Apr 18 2017
The conjecture is true if a(n) < A285549(n) for all n > 1. It holds for all a(n) < 2^64. - Max Alekseyev and Thomas Ordowski, Mar 13 2018
If prime(n) < m < a(n), then m is prime if and only if p^(m-1) == 1 (mod m) for every prime p <= prime(n). - Thomas Ordowski, Mar 05 2018
By this conjecture in the second comment, a(n) <= A135720(n+1), with equality for n > 1 iff a(n) < a(n+1), namely for n = 2, 3, 5, 6, 12, 13, 15, 25, 28, 29, ... For such n, a(n) gives all terms of A300629 > 561. - Thomas Ordowski, Mar 10 2018
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..1000 (first 100 terms from Robert G. Wilson v)
MATHEMATICA
k = 4; Do[l = Table[ Prime[i], {i, 1, n}]; While[ PrimeQ[k] || Union[PowerMod[l, k - 1, k]] != {1}, k++ ]; Print[k], {n, 1, 29}]
PROG
(PARI) isps(k, n) = {if (isprime(k), return (0)); my(nbok = 0); for (b=2, prime(n), if (Mod(b, k)^(k-1) == 1, nbok++, break)); if (nbok==prime(n)-1, return (1)); }
a(n) = {my(k=2); while (!isps(k, n), k++); return (k); } \\ Michel Marcus, Apr 27 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, May 06 2003
STATUS
approved