login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) is the index of the first occurrence of the Euclidean distance prime(n) from a point on a square spiral to its starting point at 1.
1

%I #14 Jul 25 2020 17:09:58

%S 11,28,50,176,452,536,848,1388,2048,1682,3752,4784,6272,7268,8696,

%T 7938,13748,14210,17756,19952,11888,24728,27308,25322,20456,38888,

%U 42128,45476,32792,49826,64136,68252,43698,76868,77930,90752,69216,105788,111056,108354,127628

%N a(n) is the index of the first occurrence of the Euclidean distance prime(n) from a point on a square spiral to its starting point at 1.

%H Hugo Pfoertner, <a href="/A336335/b336335.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A054552(prime(n)) if prime(n) != 1 mod 4.

%e 37--36--35--34--33--32--31

%e | |

%e 38 17--16--15--14--13 30 ...

%e | | | | |

%e 39 18 5---4---3 12 29 54

%e | | | | | | |

%e 40 19 6 1---2 d=2 d=3 53

%e | | | | | |

%e 41 20 7---8---9--10 27 52

%e | | | |

%e 42 21--22--23--24--25--26 51

%e | |

%e 43--44--45--46--47--48--49-d=5

%e .

%e a(1) = 11 is the index of the first occurrence of distance d = 2 = prime(1) from the start of the spiral.

%e a(2) = 28 is the index of the first occurrence of distance d = 3 = prime(2) from the start of the spiral.

%e Distances of the form 4*k+1 corresponding to Pythagorean primes A002144 occur earlier than on the East spoke of the square spiral, dependent on the decomposition of p^2 into two squares. prime(3)^2 = 4^2 + 3^2 leads to index a(3) = 50 in the spiral.

%Y Cf. A002144, A002145, A054552, A174344, A268038, A274923, A336336.

%K nonn

%O 1,1

%A _Hugo Pfoertner_, Jul 24 2020