OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
MATHEMATICA
Module[{nn=100, prs, cmps}, prs=Prime[Range[nn]]; cmps=Take[Complement[ Range[ Prime[nn]], prs], nn]; GCD@@@Thread[{prs+1, cmps}]] (* Harvey P. Dale, Sep 05 2013 *)
PROG
(PARI) primecompgcd(n) = { for(x=1, n, y=gcd(prime(x)+1, composite(x)); print1(y", ") ) } \ the n-th composite composite(n) = { local(c, x); c=1; x=0; while(c <= n, x++; if(!isprime(x), c++); ); return(x) }
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Aug 23 2004
STATUS
approved