|
|
A228578
|
|
Sum of the distinct prime factors of the squarefree semiprimes (A006881).
|
|
7
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
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.
|
|
LINKS
|
|
|
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 = 5.
|
|
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 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)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,changed
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|