OFFSET
2,1
COMMENTS
a(1) doesn't exist because 1 is coprime to all integers.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 2..10000
FORMULA
a(p) = 2p, for all primes p.
PROG
(PARI) a(n)=for(k=4, 2*n, if(gcd(n, k)>1 && n%k, return(k))) \\ Charles R Greathouse IV, Apr 05 2013
(PARI) a(n)=my(f=factor(n), b); forprime(p=2, , if(n%p, b=p*f[1, 1]; break)); for(i=1, #f[, 1], b=min(b, f[i, 1]^(f[i, 2]+1))); b \\ Charles R Greathouse IV, Apr 05 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jun 01 2009
EXTENSIONS
Extended by Ray Chandler, Jun 13 2009
STATUS
approved