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.

A289182 Positions of odd semiprimes in A001358.

Original entry on oeis.org

3, 6, 7, 9, 11, 13, 15, 17, 18, 19, 20, 23, 24, 26, 28, 30, 31, 32, 34, 36, 37, 39, 40, 42, 43, 44, 46, 48, 49, 51, 53, 54, 56, 57, 59, 60, 61, 63, 65, 66, 68, 69, 71, 72, 74, 75, 77, 78, 79, 80, 81, 83, 85, 86, 89, 90, 91, 92, 94, 95, 97, 98
Offset: 1

Views

Author

Zak Seidov, Jun 27 2017

Keywords

Comments

Complement to A115392.

Crossrefs

Programs

  • Mathematica
    sp=Select[Range[4,1000],2==PrimeOmega[#]&];Flatten[Position[Mod[sp, 2],1]]
  • PARI
    lista(nn) = vsp = select(x->(bigomega(x)==2), vector(nn, k, k)); select(x->(x%2), vsp, 1); \\ Michel Marcus, Jul 02 2017
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A289182(n):
        def iterfun(f,n=0):
            m, k = n, f(n)
            while m != k: m, k = k, f(k)
            return m
        def f(x): return int(-((t:=primepi(s:=isqrt(x)))*(t-1)>>1)+sum(primepi(x//p) for p in primerange(3,s+1)))
        return f(m:=iterfun(lambda x:int(n+x-f(x)),n))+primepi(m>>1) # Chai Wah Wu, Apr 03 2025

Formula

a(n) ~ n. - Charles R Greathouse IV, Jul 02 2017