cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

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.

Original entry on oeis.org

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
Offset: 1

Views

Author

Jianing Song, Nov 08 2019

Keywords

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.

Examples

			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.
		

Crossrefs

Programs

  • PARI
    a(n) = my(k=0); forprime(p=3, prime(n), if(p%8==1, k-=3, k++)); k

Extensions

Edited by Peter Munn, Nov 19 2023
Showing 1-1 of 1 results.