OFFSET
1,2
COMMENTS
Define the prime winding graph as follows: Starting at (0,0) draw a straight line up the y-axis until the first prime is attained. Once the first prime is attained draw a straight line 90 degrees to the left until the second prime is attained. When the second prime is attained draw a straight line 90 degrees to the left until the third prime is attained. Repeat this process for all primes up to a specified number. The above sequence represents the number of moves required for the x coordinate to be equal to zero, where one move is equal to a line of length 1.
LINKS
Gregory Whittaker, Prime winding graph
Gregory Whittaker, JavaScript code for prime winding graphK
PROG
(PARI) lista(nn) = {x = 0; y = 0; dir = 1; for (n=1, nn, x += round(cos(dir*Pi/2)); y += round(sin(dir*Pi/2)); if (!x, print1(n, ", ")); if (isprime(n), dir ++); dir = dir % 4; ); } \\ Michel Marcus, Dec 17 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Gregory Whittaker, Dec 16 2015
STATUS
approved