OFFSET
1,1
COMMENTS
Eric Angelini's illustration shows the first 19 rows of the triangle. Each row ends when a prime is reached, and the next row starts directly under this prime but moves in the opposite direction.
The extended illustration from Walter Trump resembles a giant ski run.
Hans Havermann's plots of A330545, linked here, extend Walter Trump's graph to 4*10^8 rows (probably the longest ski run in the world). Only the turns are shown, and the illustration has been turned sideways.
A330545(k) = 0 iff prime(k) is a term of the present sequence. In a sense A330545 and the simpler A330547 are the more fundamental sequences and show the connection between the present problem and the ordinary primes and their alternating sums.
Note that because primes > 2 are odd, a prime can only appear in column 0 at the end of a row that is moving towards the left. A prime appearing in a row moving to the right will always appear in an odd-numbered column (and in particular, not in the zero column).
Furthermore the column number mod 4 uniquely determines the residue class of primes mod 4 in that column. If the column number is 0,1,2,3 mod 4 then the primes in that column are 1,3,3,1 respectively (see the "Notes" link). In particular, a(n) == 1 mod 4. - N. J. A. Sloane, Jan 04 2020
Note that the primes > 2 in column one and two are the primes in A282178.
Note on the links: The illustrations from Angelini and Trump show all the terms 0,1,2,3,4,..., while those of Havermann and Sloane just show the primes (as in A330545).
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000 (first 516 terms from Hans Havermann)
Eric Angelini, Illustration of beginning of the triangle in A330339.
Hans Havermann, Plot of 4*10^8 terms of A330545, sampled every 1000 terms, points joined.
Hans Havermann, More detailed view of terms of A330545 from 290 million to 310 million, sampled every 10 terms, points joined.
N. J. A. Sloane, Illustration of first 16 rows of A330545.
N. J. A. Sloane, State diagram for columns of A330545.
Walter Trump, An extended picture of the triangle in A330339, showing the first 550 rows, down to the row that starts 3989. [The zeroth column is just to the right of the vertical red line. Note that after a while the rows extend to the left of the red line. The digits are too small to be read.]
Walter Trump, An extended picture of the triangle in A330339, showing the first 550 rows, down to the row that starts 3989. [Same picture as the previous one, but with 6 red dots added to show the primes in column 0.]
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Dec 17 2019, following a suggestion from Eric Angelini. a(5) and a(6) were found by Walter Trump. a(7)-a(17) from N. J. A. Sloane, Dec 17 2019.
EXTENSIONS
More terms from Hans Havermann, Dec 17 2019
STATUS
approved