login
A160995
The smallest positive integer neither a divisor of n nor coprime to n.
2
4, 6, 6, 10, 4, 14, 6, 6, 4, 22, 8, 26, 4, 6, 6, 34, 4, 38, 6, 6, 4, 46, 9, 10, 4, 6, 6, 58, 4, 62, 6, 6, 4, 10, 8, 74, 4, 6, 6, 82, 4, 86, 6, 6, 4, 94, 9, 14, 4, 6, 6, 106, 4, 10, 6, 6, 4, 118, 8, 122, 4, 6, 6, 10, 4, 134, 6, 6, 4, 142, 10, 146, 4, 6, 6, 14, 4, 158, 6, 6, 4, 166, 8, 10, 4, 6
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
Sequence in context: A199172 A323674 A183986 * A215454 A155750 A159475
KEYWORD
nonn
AUTHOR
Leroy Quet, Jun 01 2009
EXTENSIONS
Extended by Ray Chandler, Jun 13 2009
STATUS
approved