A379731 List of y coordinates of prime numbers in the Cartesian grid defined in A379643.
0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 2, 3, 2, 2, 2, 3, 3, 4, 4, 4, 3, 3, 3, 2, 1, 2, 2, 2, 3, 2, 2, 2, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 4, 5, 5, 5, 5, 5, 6, 5, 5, 4, 4, 3, 3, 4, 4, 5, 4, 4, 5, 5, 5, 4, 5, 5, 4, 4, 5, 4, 4, 4, 5, 5, 5, 6, 7, 6, 5, 5, 6, 6, 5, 5, 5, 4
Offset: 1
Keywords
Programs
-
Python
from sympy import nextprime; R = [0, 0]; y, p = 0, 3 for _ in range(85): p = nextprime(p); d = (p%8 - 3)//2 if d in {-1, 1}: y += d R.append(y) print(*R, sep = ', ')
Formula
a(n) = pi_{8,5}(p_n) - pi_{8,1}(p_n), where pi_{m,b}(x) is the number of primes <= x which are congruent to b (mod m) and p_n the n-th prime.
Comments