OFFSET
1,1
COMMENTS
A141768 is the analog using the Rabin-Miller test rather than the Fermat test. The infinitude of that sequence implies that this sequence is likewise infinite.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..659
PROG
(PARI) bases(n)=my(f=factor(n)[, 1]); n--; prod(i=1, #f, gcd(f[i]-1, n))
Korselt(n)=my(f=factor(n)); for(i=1, #f[, 1], if(f[i, 2]>1||(n-1)%(f[i, 1]-1), return(0))); 1
r=0; p=5; forprime(q=7, 1e7, forstep(n=p+2, q-2, 2, if(bases(n)>r&&!Korselt(n), r=bases(n); print1(n", "))); p=q) \\ Charles R Greathouse IV, Sep 14 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Charles R Greathouse IV, Sep 13 2011
STATUS
approved