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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
FORMULA
A340763(n) + a(n) = A000720(n) - 1 for n >= 3.
EXAMPLE
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.
MATHEMATICA
Accumulate[Table[If[PrimeQ[n]&&Mod[n, 3]==2, 1, 0], {n, 90}]] (* Harvey P. Dale, May 12 2022 *)
PROG
(PARI) a(n) = sum(i=1, n, isprime(i) && (i%3==2))
CROSSREFS
Sequence in context: A138194 A133876 A321018 * A152467 A242602 A097992
KEYWORD
nonn,easy
AUTHOR
Jianing Song, Apr 28 2021
STATUS
approved

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 April 16 11:48 EDT 2024. Contains 371711 sequences. (Running on oeis4.)