OFFSET
1,8
COMMENTS
Most of the primes show up in the first and second quadrants (see Links). a(30733704), located at (-390, -1), is the first appearance in the third quadrant and a(1531917197), located at (3807, -1), in the fourth quadrant. The corresponding y coordinates are given in A379731.
Conjecture: no prime appears on the negative y-axis.
LINKS
FORMULA
a(n) = pi_{8,3}(p_n) - pi_{8,7}(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.
EXAMPLE
a(1) = 0 and a(2) = 1, because by definition the (x, y) coordinates of prime(1) and prime(2) are (0,0) and (1,0). For a(10), taking one unit from the position of prime(9), which is (1,1), in the direction (prime(10)-3)*45 = (29-3)*45 = 1170 degrees counterclockwise from the positive x-axis reaches (1,2), or a(10) = 1. Positions of primes up to one million are illustrated in Links.
PROG
(Python)
from sympy import nextprime; R = [0, 1]; x, p = 1, 3
for _ in range(84):
p = nextprime(p); d = (5 - p%8)//2
if d in {-1, 1}: x += d
R.append(x)
print(*R, sep = ', ')
CROSSREFS
KEYWORD
sign
AUTHOR
Ya-Ping Lu, Dec 28 2024
STATUS
approved