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-3 of 3 results.

A379643 List of x coordinates of prime numbers in a Cartesian grid, where the first prime 2 is placed at the origin (0,0) and the second prime 3 at (1,0). For the n-th prime prime(n), n >= 3, take a unit step in the direction (prime(n)-3)*45 degrees counterclockwise from the positive x-axis.

Original entry on oeis.org

0, 1, 1, 0, 1, 1, 1, 2, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 2, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, -1, -1, -1, 0, 0, 1, 0, 0, 0, 1, 1, 2, 2, 2, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, -1, 0
Offset: 1

Views

Author

Ya-Ping Lu, Dec 28 2024

Keywords

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.

Examples

			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.
		

Crossrefs

Programs

  • 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 = ', ')

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.

A297448 Primes p for which pi_{8,5}(p) - pi_{8,1}(p) = -1, where pi_{m,a}(x) is the number of primes <= x which are congruent to a (mod m).

Original entry on oeis.org

588067889, 588068009, 588068093, 588068309, 588068333, 588068477, 588068717, 588069137, 588069169, 588069409, 588069529, 588069809, 588070897, 588070949, 588071009, 588071101, 588071401, 588071573, 588071597, 588079253
Offset: 1

Views

Author

Andrey S. Shchebetov and Sergei D. Shchebetov, Dec 30 2017

Keywords

Comments

This is a companion sequence to A297447. The first two sign-changing zones were discovered by Bays and Hudson back in 1979. We discovered four additional zones starting from a(22794) = 5267226902633. The full sequence with all 6 zones checked up to 5*10^14 contains 664175 terms (see a-file) with a(664175) = 194318969449909 as its last term.
This sequence was checked up to 10^15 and the 7th sign-changing zone starting from a(664176) = 930525161507057 and ending with a(850232)= 932080335660277 was found. - Andrey S. Shchebetov and Sergei D. Shchebetov, Jul 28 2018
The y-coordinate of the terms in this sequence on the Cartesian grid defined in A379643 is -1. - Ya-Ping Lu, Jan 07 2025

Crossrefs

Programs

  • Python
    from sympy import nextprime; p, r1, r5 = 1, 0, 0
    while p <= 588079253:
        p = nextprime(p); r = p%8
        if r == 1: r1 += 1
        elif r == 5: r5 += 1
    if r in {1, 5} and r1 == r5 + 1: print(p, end = ', ')  # Ya-Ping Lu, Jan 07 2025

A379989 Prime numbers on the x-axis of the Cartesian grid defined in A379643.

Original entry on oeis.org

2, 3, 588065761, 588065801, 588067729, 588067793, 588067811, 588067849, 588067981, 588068773, 588068783, 588069121, 588069149, 588069173, 588069179, 588069203, 588069211, 588069259, 588069353, 588069367, 588069401, 588069403, 588069413, 588069431, 588069479
Offset: 1

Views

Author

Ya-Ping Lu, Jan 07 2025

Keywords

Comments

Prime numbers p such that pi_{8,5}(p) - pi_{8,1}(p) = 0, where pi_{m,b}(x) is the number of primes <= x which are congruent to b (mod m).
Terms in this sequence are found in narrow regions covering the sign-changing zones (see Bays and Hudson in Links and Comments in A297448). Terms in the first zone in A297448 are in the region a(3) through a(1085) located on the negative x-axis, while terms in the second zone are in the region a(1086) through a(45606) located on the positive x-axis (see the table below).
n k a(n) = p(k) x coordinate
------------- ------------------------ -------------------------- ------------
1 1 2 = 0
2 2 3 > 0
3 to 1085 30733591 to 31022217 588065761 to 593890729 < 0
1086 to 45606 1531917196 to 1602638733 35615130457 to 37335022091 > 0

Crossrefs

Programs

  • Python
    from sympy import nextprime
    p, y = 2, 0; R = [p]
    while p < 588069479:
        p = nextprime(p); dy = (p%8-3)//2
        if dy in {-1, 1}: y += dy
        if y == 0: R.append(p)
    print(*R, sep = ', ')
Showing 1-3 of 3 results.