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.

A378764 Sum of the semiprimes which are less than or equal to n minus the sum of the primes which are less than or equal to n.

This page as a plain text file.
%I A378764 #15 Jan 11 2025 19:21:52
%S A378764 0,-2,-5,-1,-6,0,-7,-7,2,12,1,1,-12,2,17,17,0,0,-19,-19,2,24,1,1,26,
%T A378764 52,52,52,23,23,-8,-8,25,59,94,94,57,95,134,134,93,93,50,50,50,96,49,
%U A378764 49,98,98,149,149,96,96,151,151,208,266,207,207,146,208,208,208,273,273,206,206,275,275
%N A378764 Sum of the semiprimes which are less than or equal to n minus the sum of the primes which are less than or equal to n.
%C A378764 After a(32), a(n) always exceeds 0. See A243906(32).
%e A378764 a(6) = 0, because (4+6) - (2+3+5) = 0.
%t A378764 a[n_] := Plus @@ Select[ Range@ n, PrimeOmega@ # == 2 &] - Plus @@ Select[ Range@ n, PrimeOmega@ # == 1 &]; Array[a, 70]
%o A378764 (PARI) a(n) = my(vf=apply(factor, [1..n])); vecsum(Vec(select(x->(bigomega(x)==2), vf, 1))) - vecsum(Vec(select(x->(bigomega(x)==1), vf, 1))); \\ _Michel Marcus_, Dec 28 2024
%Y A378764 Cf. A001358, A062198, A000040, A007504, A243906.
%K A378764 sign
%O A378764 1,2
%A A378764 _Robert G. Wilson v_ and Luca Bencini-Tibo, Dec 20 2024