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 A138109 #31 Mar 05 2025 10:46:50 %S A138109 6,15,21,35,55,65,77,85,91,95,115,119,133,143,161,187,203,209,217,221, %T A138109 247,253,259,287,299,301,319,323,329,341,377,391,403,407,437,451,473, %U A138109 481,493,517,527,533,551,559,583,589,611,629,649,667,671,689,697,703 %N A138109 Positive integers k whose smallest prime factor is greater than the cube root of k and strictly less than the square root of k. %C A138109 This sequence was suggested by _Moshe Shmuel Newman_. %C A138109 A020639(n)^2 < a(n) < A020639(n)^3. - _Reinhard Zumkeller_, Dec 17 2014 %C A138109 In other words, k = p*q with primes p, q satisfying p < q < p^2. - _Charles R Greathouse IV_, Apr 03 2017 %C A138109 If "strictly less than" in the definition were changed to "less than or equal to" then this sequence would also include the squares of primes (A001248), resulting in A251728. - _Jon E. Schoenfield_, Dec 27 2022 %H A138109 Reinhard Zumkeller, <a href="/A138109/b138109.txt">Table of n, a(n) for n = 1..10000</a> %F A138109 From _Michael De Vlieger_, Apr 27 2024: (Start) %F A138109 Let k = a(n); row k of A162306 = {1, p, q, p^2, p*q}, therefore A010846(k) = 5. %F A138109 A079047(n) = card({ q : p < q < p^2 }), p and q primes. (End) %e A138109 6 is a term because the smallest prime factor of 6 is 2 and 6^(1/3) = 1.817... < 2 < 2.449... = sqrt(6). %e A138109 From _Michael De Vlieger_, Apr 27 2024: (Start): %e A138109 Table of p*q where p = prime(n) and q = prime(n+k): %e A138109 n\k 1 2 3 4 5 6 7 8 9 10 11 %e A138109 ------------------------------------------------------------------- %e A138109 1: 6; %e A138109 2: 15, 21; %e A138109 3: 35, 55, 65, 85, 95, 115; %e A138109 4: 77, 91, 119, 133, 161, 203, 217, 259, 287, 301, 329; %e A138109 ... (End) %t A138109 s = {}; Do[f = FactorInteger[i]; test = f[[1]][[1]]; If [test < N[i^(1/2)] && test > N[i^(1/3)], s = Union[s, {i}]], {i, 2, 2000}]; Print[s] %t A138109 Select[Range[1000],Surd[#,3]<FactorInteger[#][[1,1]]<Sqrt[#]&] (* _Harvey P. Dale_, May 10 2015 *) %o A138109 (Haskell) %o A138109 a138109 n = a138109_list !! (n-1) %o A138109 a138109_list = filter f [1..] where %o A138109 f x = p ^ 2 < x && x < p ^ 3 where p = a020639 x %o A138109 -- _Reinhard Zumkeller_, Dec 17 2014 %o A138109 (PARI) is(n)=my(f=factor(n)); f[,2]==[1,1]~ && f[1,1]^3 > n \\ _Charles R Greathouse IV_, Mar 28 2017 %o A138109 (PARI) list(lim)=if(lim<6, return([])); my(v=List([6])); forprime(p=3,sqrtint(1+lim\=1)-1, forprime(q=p+2, min(p^2-2,lim\p), listput(v,p*q))); Set(v) \\ _Charles R Greathouse IV_, Mar 28 2017 %o A138109 (Python) %o A138109 from math import isqrt %o A138109 from sympy import primepi, primerange %o A138109 def A138109(n): %o A138109 def bisection(f,kmin=0,kmax=1): %o A138109 while f(kmax) > kmax: kmax <<= 1 %o A138109 kmin = kmax >> 1 %o A138109 while kmax-kmin > 1: %o A138109 kmid = kmax+kmin>>1 %o A138109 if f(kmid) <= kmid: %o A138109 kmax = kmid %o A138109 else: %o A138109 kmin = kmid %o A138109 return kmax %o A138109 def f(x): return int(n+x+(t:=primepi(s:=isqrt(x)))+(t*(t-1)>>1)-sum(primepi(min(x//p,p**2)) for p in primerange(s+1))) %o A138109 return bisection(f,n,n) # _Chai Wah Wu_, Mar 05 2025 %Y A138109 Subsequence of A251728 and of A006881. A006094 is a proper subset. %Y A138109 Cf. A020639, A010846, A079047, A162306. %K A138109 nonn %O A138109 1,1 %A A138109 _David S. Newman_, May 04 2008