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.

A228578 Sum of the distinct prime factors of the squarefree semiprimes (A006881).

Original entry on oeis.org

5, 7, 9, 8, 10, 13, 15, 14, 19, 12, 21, 16, 25, 20, 16, 22, 31, 33, 18, 26, 39, 18, 43, 22, 45, 32, 20, 34, 49, 24, 55, 40, 28, 61, 24, 63, 44, 46, 26, 69, 50, 73, 24, 34, 75, 36, 81, 56, 30, 85, 62, 91, 64, 42, 28, 99, 70, 103, 36, 46, 105, 30, 74, 109, 48, 38, 111
Offset: 1

Views

Author

Wesley Ivan Hurt, Aug 28 2013

Keywords

Comments

Sum of the distinct prime factors of A006881(n). If A006881(n) is even then a(n) = A006881(n)/2 + 2. If A006881(n) is odd then a(n) is even.

Examples

			a(1) = 5, since 6 is the first squarefree semiprime and the sum of the distinct prime factors of 6 is 2 + 3 = 5. a(2) = 7 since 10 is the second squarefree semiprime and the sum of the distinct prime factors of 10 is 2 + 5 = 7.
		

Crossrefs

Programs

  • Mathematica
    Total[First /@ FactorInteger@ #] & /@ Select[Range@ 240, PrimeNu@ # == 2 && SquareFreeQ@ # &] (* Michael De Vlieger, Oct 28 2015 *)
  • PARI
    do(x)=my(v=List()); forprime(p=3,x\2, forprime(q=2,min(x\p,p-1), listput(v,[p*q,p+q]))); v=vecsort(Vec(v),1); apply(u->u[2],v) \\ Charles R Greathouse IV, Nov 05 2017
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, primefactors
    def A228578(n):
        def f(x): return int(n+x+(t:=primepi(s:=isqrt(x)))+(t*(t-1)>>1)-sum(primepi(x//k) for k in primerange(1, s+1)))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return sum(primefactors(m)) # Chai Wah Wu, Aug 16 2024

Formula

a(n) = sopf(A006881(n)) = A008472(A006881(n)).
Also, a(n) = sopfr(A006881(n)) = A001414(A006881(n)) because A006881 are squarefree. - Zak Seidov, Oct 28 2015

Extensions

a(61)-a(67) corrected by Michael De Vlieger, Oct 28 2015