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.

A037143 Numbers with at most 2 prime factors (counted with multiplicity).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 25, 26, 29, 31, 33, 34, 35, 37, 38, 39, 41, 43, 46, 47, 49, 51, 53, 55, 57, 58, 59, 61, 62, 65, 67, 69, 71, 73, 74, 77, 79, 82, 83, 85, 86, 87, 89, 91, 93, 94, 95, 97, 101, 103, 106, 107, 109, 111, 113, 115, 118
Offset: 1

Views

Author

Keywords

Comments

A001222(a(n)) <= 2; A054576(a(n)) = 1. - Reinhard Zumkeller, Mar 10 2006
Products of two noncomposite numbers. - Juri-Stepan Gerasimov, Apr 15 2010
Also, numbers with permutations of all divisors only with coprime adjacent elements: A109810(a(n)) > 0. - Reinhard Zumkeller, May 24 2010
A060278(a(n)) = 0. - Reinhard Zumkeller, Apr 05 2013
1 together with numbers k such that sigma(k) + phi(k) - d(k) = 2k - 2. - Wesley Ivan Hurt, May 03 2015
Products of two not necessarily distinct terms of A008578 (the same relation between A000040 and A001358). - Flávio V. Fernandes, May 28 2021

Crossrefs

Union of A008578 and A001358. Complement of A033942.
A101040(a(n))=1 for n>1.
Subsequence of A037144. - Reinhard Zumkeller, May 24 2010
A098962 and A139690 are subsequences.

Programs

  • Haskell
    a037143 n = a037143_list !! (n-1)
    a037143_list = 1 : merge a000040_list a001358_list where
       merge xs'@(x:xs) ys'@(y:ys) =
             if x < y then x : merge xs ys' else y : merge xs' ys
    -- Reinhard Zumkeller, Dec 18 2012
    
  • Maple
    with(numtheory): A037143:=n->`if`(bigomega(n)<3,n,NULL): seq(A037143(n), n=1..200); # Wesley Ivan Hurt, May 03 2015
  • Mathematica
    Select[Range[120], PrimeOmega[#] <= 2 &] (* Ivan Neretin, Aug 16 2015 *)
  • PARI
    is(n)=bigomega(n)<3 \\ Charles R Greathouse IV, Apr 29 2015
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A037143(n):
        def f(x): return int(n-2+x-primepi(x)-sum(primepi(x//k)-a for a,k in enumerate(primerange(isqrt(x)+1))))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return kmax # Chai Wah Wu, Aug 23 2024

Extensions

More terms from Henry Bottomley, Aug 15 2001