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).

This page as a plain text file.
%I A228578 #48 Aug 26 2024 07:40:45
%S A228578 5,7,9,8,10,13,15,14,19,12,21,16,25,20,16,22,31,33,18,26,39,18,43,22,
%T A228578 45,32,20,34,49,24,55,40,28,61,24,63,44,46,26,69,50,73,24,34,75,36,81,
%U A228578 56,30,85,62,91,64,42,28,99,70,103,36,46,105,30,74,109,48,38,111
%N A228578 Sum of the distinct prime factors of the squarefree semiprimes (A006881).
%C A228578 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.
%H A228578 Michael De Vlieger, <a href="/A228578/b228578.txt">Table of n, a(n) for n = 1..10000</a>
%F A228578 a(n) = sopf(A006881(n)) = A008472(A006881(n)).
%F A228578 Also, a(n) = sopfr(A006881(n)) = A001414(A006881(n)) because A006881 are squarefree. - _Zak Seidov_, Oct 28 2015
%e A228578 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.
%t A228578 Total[First /@ FactorInteger@ #] & /@ Select[Range@ 240, PrimeNu@ # == 2 && SquareFreeQ@ # &] (* _Michael De Vlieger_, Oct 28 2015 *)
%o A228578 (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
%o A228578 (Python)
%o A228578 from math import isqrt
%o A228578 from sympy import primepi, primerange, primefactors
%o A228578 def A228578(n):
%o A228578     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)))
%o A228578     m, k = n, f(n)
%o A228578     while m != k:
%o A228578         m, k = k, f(k)
%o A228578     return sum(primefactors(m)) # _Chai Wah Wu_, Aug 16 2024
%Y A228578 Cf. A006881, A001414, A008472.
%K A228578 nonn,easy
%O A228578 1,1
%A A228578 _Wesley Ivan Hurt_, Aug 28 2013
%E A228578 a(61)-a(67) corrected by _Michael De Vlieger_, Oct 28 2015