OFFSET
1,2
COMMENTS
Primes for which there are no such numbers (i.e. prime(n) such that a(n)=0) are given in A051663.
LINKS
EXAMPLE
a(1)=0 since there is no Carmichael number having prime(1)=2 as factor.
a(2)=561 since this is the largest (since only) Carmichael number of the form pqr with prime r>q>p=prime(2)=3.
a(5)=0 since there is no Carmichael number of the form pqr with prime r>q>p=prime(5)=11.
PROG
(PARI) A141706(n) = { /* based on code by J.Brennen (jb AT brennen.net) */ local( V=[], B, p=prime(n), q, r); for( A=1, p-1, B=ceil((p^2+1)/A); while( 1, r=(p*B-p+A*B-B)/(A*B-p*p); q=(A*r-A+1)/p; q<=p && break; denominator(q)==1 && denominator(r)==1 && r>q && isprime(q) && isprime(r) && (p*q*r)%(p-1)==1 && V=concat(V, [p*q*r]); B++ )); if( V, vecmax( V ))}
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Jul 03 2008
STATUS
approved