OFFSET
1,1
COMMENTS
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
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.
MATHEMATICA
Total[First /@ FactorInteger@ #] & /@ Select[Range@ 240, PrimeNu@ # == 2 && SquareFreeQ@ # &] (* Michael De Vlieger, Oct 28 2015 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Aug 28 2013
EXTENSIONS
a(61)-a(67) corrected by Michael De Vlieger, Oct 28 2015
STATUS
approved