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.

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.

Original entry on oeis.org

6, 15, 21, 35, 55, 65, 77, 85, 91, 95, 115, 119, 133, 143, 161, 187, 203, 209, 217, 221, 247, 253, 259, 287, 299, 301, 319, 323, 329, 341, 377, 391, 403, 407, 437, 451, 473, 481, 493, 517, 527, 533, 551, 559, 583, 589, 611, 629, 649, 667, 671, 689, 697, 703
Offset: 1

Views

Author

David S. Newman, May 04 2008

Keywords

Comments

This sequence was suggested by Moshe Shmuel Newman.
A020639(n)^2 < a(n) < A020639(n)^3. - Reinhard Zumkeller, Dec 17 2014
In other words, k = p*q with primes p, q satisfying p < q < p^2. - Charles R Greathouse IV, Apr 03 2017
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

Examples

			6 is a term because the smallest prime factor of 6 is 2 and 6^(1/3) = 1.817... < 2 < 2.449... = sqrt(6).
From _Michael De Vlieger_, Apr 27 2024: (Start):
Table of p*q where p = prime(n) and q = prime(n+k):
n\k   1     2     3     4     5     6     7     8     9    10    11
-------------------------------------------------------------------
1:    6;
2:   15,   21;
3:   35,   55,   65,   85,   95,  115;
4:   77,   91,  119,  133,  161,  203,  217,  259,  287,  301,  329;
     ... (End)
		

Crossrefs

Subsequence of A251728 and of A006881. A006094 is a proper subset.

Programs

  • Haskell
    a138109 n = a138109_list !! (n-1)
    a138109_list = filter f [1..] where
       f x = p ^ 2 < x && x < p ^ 3 where p = a020639 x
    -- Reinhard Zumkeller, Dec 17 2014
    
  • Mathematica
    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]
    Select[Range[1000],Surd[#,3]Harvey P. Dale, May 10 2015 *)
  • PARI
    is(n)=my(f=factor(n)); f[,2]==[1,1]~ && f[1,1]^3 > n \\ Charles R Greathouse IV, Mar 28 2017
    
  • 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
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A138109(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        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)))
        return bisection(f,n,n) # Chai Wah Wu, Mar 05 2025

Formula

From Michael De Vlieger, Apr 27 2024: (Start)
Let k = a(n); row k of A162306 = {1, p, q, p^2, p*q}, therefore A010846(k) = 5.
A079047(n) = card({ q : p < q < p^2 }), p and q primes. (End)