

A268463


Least number of steps required in 2D prime walk for it to cross itself n times.


1



1, 15, 35, 47, 81, 7087, 7399, 19865, 19913, 24087, 24279, 408257, 409303, 2042205, 5262017, 5262089, 6189393, 6435851, 6435983
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


COMMENTS

The 2D prime walk on the square grid is constructed as follows. Iterate through the positive integers starting with 1. When you encounter a nonprime the walk goes straight, when you encounter a prime it turns right.
The longest known gap between two consecutive visits is 12741511, when step 25980222 revisits the cell of step 13238712.
The longest known Manhattan distance from the origin is 311534, which occurs at step 1222232279.


LINKS

Table of n, a(n) for n=0..18.
Brian Hayes, Gruenberger's prime path
Dmitry Kamenetsky, The prime walk for the first 9557576 steps (The path is colored such that the start of the walk is dark blue, the center is green and the end is dark red).
Dmitry Kamenetsky, The number of visits in each cell of the walk for the first 9557576 steps (Lighter colors imply more visits).
Noel Patson, Prime Walk Demo
Math StackExchange question, lattice walks with primes and composites


EXAMPLE

a(1)=15, because step 15 is the first time the walk crosses itself (at cell of step 3).
a(2)=35, because step 35 is the first time the walk crosses itself twice.


CROSSREFS

Sequence in context: A090196 A143202 A321182 * A108668 A201018 A187400
Adjacent sequences: A268460 A268461 A268462 * A268464 A268465 A268466


KEYWORD

nonn,more


AUTHOR

Dmitry Kamenetsky, Feb 04 2016


STATUS

approved



