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.
%I A160995 #36 Jul 20 2025 08:55:36 %S A160995 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, %T A160995 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, %U A160995 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 %N A160995 The smallest positive integer neither a divisor of n nor coprime to n. %C A160995 a(1) doesn't exist because 1 is coprime to all integers. %C A160995 Terms are composite since primes either divide or are coprime to other numbers. - _Michael De Vlieger_, Feb 20 2025 %H A160995 Charles R Greathouse IV, <a href="/A160995/b160995.txt">Table of n, a(n) for n = 2..10000</a> %F A160995 For composite n > 4, a(n) is the first term of row n of A133995. - _Michael De Vlieger_, Feb 20 2025 %F A160995 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] %F A160995 a(n) = min(A096014(n), A135718(n)). - _Michael De Vlieger_, Feb 24 2025 %e A160995 From _David James Sycamore_, Feb 28 2025: (Start) %e A160995 Using my formula above: n = 4235 = 5*7*11^2, so a(n) = 2*5 = 10. %e A160995 For n = odd prime p, a(n) = 2*p. %e A160995 For n = 2, a(n) = min{2^2, 2*3} = 4. %e A160995 For n = 4, a(n) = min{2^3, 2*3} = 6. (For all n = 2^k, k >= 2, a(n) = 6.) %e A160995 For n = 120 = 2^3*3*5, a(n) = min{16, 9, 25, 14} = 9. %e A160995 For n = 5040 = 2^4*3^2*5*7, a(n) = min{32, 27, 25, 49, 22} = 22. %e A160995 For n = 3603600 = 2^4*3^2*5^2*7*11*13, a(n) = min{32,27,125,49,121,169,34} = 27. (End) %t A160995 Table[k = 3; Until[1 < GCD[k, n] < k, k++]; k, {n, 2, 120}] (* _Michael De Vlieger_, Feb 20 2025 *) %o A160995 (PARI) a(n)=for(k=4,2*n,if(gcd(n,k)>1 && n%k, return(k))) \\ _Charles R Greathouse IV_, Apr 05 2013 %o A160995 (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 %Y A160995 Cf. A001221, A020639, A053669, A096014, A100484, A133995, A135718. %K A160995 nonn %O A160995 2,1 %A A160995 _Leroy Quet_, Jun 01 2009 %E A160995 Extended by _Ray Chandler_, Jun 13 2009