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!)
A329243 a(n) = Pi(8,3)(prime(n)) + Pi(8,5)(prime(n)) + Pi(8,7)(prime(n)) - 3*Pi(8,1)(prime(n)), where Pi(a,b)(x) denotes the number of primes in the arithmetic progression a*k + b less than or equal to x. 2
0, 1, 2, 3, 4, 5, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8, 9, 10, 11, 8, 9, 10, 7, 4, 5, 6, 7, 8, 5, 6, 7, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 11, 12, 13, 14, 15, 16, 17, 14, 15, 12, 13, 10, 11, 12, 13, 14, 11, 12, 13, 14, 15, 12, 13, 14, 11, 12, 13, 10, 11, 12, 13, 14, 15, 16 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
The initial terms are nonnegative integers, a(n) is negative for some prime(n) ~ 10^28.127. See the comments about "Chebyshev's bias" in A329242.
LINKS
EXAMPLE
For prime(25) = 97, there are 5 primes <= 97 that are congruent to 1 mod 8 (17, 41, 73, 89, 97), 7 primes congruent to 3 mod 8 (3, 11, 19, 43, 59, 67, 83), 6 primes congruent to 5 mod 8 (5, 13, 29, 37, 53, 61), 6 primes congruent to 7 mod 8 (7, 23, 31, 47, 71, 79), so a(25) = 7 + 6 + 6 - 3*5 = 4.
PROG
(PARI) a(n) = my(k=0); forprime(p=3, prime(n), if(p%8==1, k-=3, k++)); k
CROSSREFS
Cf. A329242.
Sequence in context: A070772 A094937 A215089 * A161768 A213925 A141810
KEYWORD
sign
AUTHOR
Jianing Song, Nov 08 2019
EXTENSIONS
Edited by Peter Munn, Nov 19 2023
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 24 19:52 EDT 2024. Contains 371963 sequences. (Running on oeis4.)