The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A340764 Number of primes p <= n that are congruent to 2 modulo 3. 4

%I #16 May 12 2022 15:22:41

%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,6,6,6,6,6,6,

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

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

%N Number of primes p <= n that are congruent to 2 modulo 3.

%H Jianing Song, <a href="/A340764/b340764.txt">Table of n, a(n) for n = 1..10000</a>

%F A340763(n) + a(n) = A000720(n) - 1 for n >= 3.

%e There are 13 primes <= 100 that are congruent to 2 modulo 3, namely 2, 5, 11, 17, 23, 29, 41, 47, 53, 59, 71, 83, 89, so a(100) = 13.

%t Accumulate[Table[If[PrimeQ[n]&&Mod[n,3]==2,1,0],{n,90}]] (* _Harvey P. Dale_, May 12 2022 *)

%o (PARI) a(n) = sum(i=1, n, isprime(i) && (i%3==2))

%Y Cf. A003627, A340763, A340767, A066339, A066490.

%K nonn,easy

%O 1,5

%A _Jianing Song_, Apr 28 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 13:22 EDT 2024. Contains 372736 sequences. (Running on oeis4.)