login

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

a(n) = round(pi(n)/2).
1

%I #12 Feb 21 2022 11:24:47

%S 0,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,5,5,5,6,6,6,6,

%T 6,6,6,6,6,6,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,

%U 10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13

%N a(n) = round(pi(n)/2).

%C More terms than usual are displayed in order to distinguish this from neighboring sequences.

%t Floor[#/2+1/2]&/@Accumulate[Table[If[PrimeQ[n],1,0],{n,100}]] (* _Harvey P. Dale_, Feb 21 2022 *)

%Y Cf. A000720, A321017.

%Y Suggested by A321005.

%K nonn

%O 1,5

%A _N. J. A. Sloane_, Nov 09 2018