Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #7 Aug 15 2023 07:45:01
%S 1,2,2,3,4,4,4,5,6,7,8,8,8,9,10,11,12,12,12,13,14,15,16,16,16,16,16,
%T 16,16,17,18,18,18,18,18,18,18,19,20,21,22,22,22,23,24,25,26,26,26,26,
%U 26,26,26,27,28,29,30,31,32,32,32,33,34,35,36,37,38,38,38,38,38,39,40,40
%N Partial sums of A131377.
%p P:=proc(n) local i,k,s; k:=1; s:=0; for i from 0 by 1 to n do if isprime(i) then if k=1 then k:=0; else k:=1; fi; fi; s:=s+k; print(s); od; end: P(100);
%o (PARI) a(n) = sum(m=0, n, (primepi(m) % 2) == 0) \\ _Michel Marcus_, Aug 15 2023
%Y Cf. A131377.
%K easy,nonn
%O 0,2
%A _Paolo P. Lava_ and _Giorgio Balzarotti_, Jul 18 2007