A228578 Sum of the distinct prime factors of the squarefree semiprimes (A006881).
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
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.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
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
Extensions
a(61)-a(67) corrected by Michael De Vlieger, Oct 28 2015
Comments