OFFSET
1,1
COMMENTS
Smallest k such that prime(k) > n*composite(k).
EXAMPLE
n=39: p(39)=167, c(39)=56, q=2.98; n=40: p(40)=173, c(40)=57, q=3.035, so a(3)=40.
MATHEMATICA
f[x_] := Floor[Prime[x] / FixedPoint[x + PrimePi[ # ] + 1 &, x]]; t=Table[0, {30}]; Do[ s = f[n]; If[ s < 31 && t[[s]]==0, t[[s]] = n], {n, 1000000}]; t
PROG
(PARI) nextcomposite(k)=if(k<3, 4, if(isprime(k), k+1, k));
(PARI) k=1; p=2; q=4; for(n=1, 19, while(p<=n*q, p=nextprime(p+1); q=nextcomposite(q+1); k++); print1(k, ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Aug 02 2002
EXTENSIONS
a(12)-a(19) and PARI code from Klaus Brockhaus, Apr 26 2004
a(20)-a(27) from Robert G. Wilson v, Apr 28 2004
STATUS
approved