cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A160995 The smallest positive integer neither a divisor of n nor coprime to n.

Original entry on oeis.org

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

Views

Author

Leroy Quet, Jun 01 2009

Keywords

Comments

a(1) doesn't exist because 1 is coprime to all integers.
Terms are composite since primes either divide or are coprime to other numbers. - Michael De Vlieger, Feb 20 2025

Examples

			From _David James Sycamore_, Feb 28 2025: (Start)
Using my formula above: n = 4235 = 5*7*11^2, so a(n) = 2*5 = 10.
For n = odd prime p, a(n) = 2*p.
For n = 2, a(n) = min{2^2, 2*3} = 4.
For n = 4, a(n) = min{2^3, 2*3} = 6. (For all n = 2^k, k >= 2, a(n) = 6.)
For n = 120 = 2^3*3*5, a(n) = min{16, 9, 25, 14} = 9.
For n = 5040 = 2^4*3^2*5*7, a(n) = min{32, 27, 25, 49, 22} = 22.
For n = 3603600 = 2^4*3^2*5^2*7*11*13, a(n) = min{32,27,125,49,121,169,34} = 27. (End)
		

Crossrefs

Programs

  • Mathematica
    Table[k = 3; Until[1 < GCD[k, n] < k, k++]; k, {n, 2, 120}] (* Michael De Vlieger, Feb 20 2025 *)
  • 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

Formula

For composite n > 4, a(n) is the first term of row n of A133995. - Michael De Vlieger, Feb 20 2025
For even n whose prime factorization is Product_{i=1..k} (p_i)^(e_i), a(n) = min({p_i^(e_i + 1) : i = 1..k} U {2*q}), where q = A053669(n); for odd n, a(n) = 2*A020639(n); see Example. - David James Sycamore, Feb 28 2025 [edited by Peter Munn, Jul 20 2025]
a(n) = min(A096014(n), A135718(n)). - Michael De Vlieger, Feb 24 2025

Extensions

Extended by Ray Chandler, Jun 13 2009