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.

A308080 Index positions of the points with integer coordinates with primary sorting by radius and secondary sorting by polar angle in the counterclockwise square spiral described by A174344 and A274923.

This page as a plain text file.
%I A308080 #9 May 16 2019 21:49:16
%S A308080 1,2,4,6,8,3,5,7,9,11,15,19,23,12,14,16,18,20,22,24,10,13,17,21,25,28,
%T A308080 34,40,46,29,33,35,39,41,45,47,27,30,32,36,38,42,44,48,26,53,61,69,77,
%U A308080 54,60,62,68,70,76,78,52,31,37,43,49,55,59,63,67,71,75,79
%N A308080 Index positions of the points with integer coordinates with primary sorting by radius and secondary sorting by polar angle in the counterclockwise square spiral described by A174344 and A274923.
%C A308080 The lists of the ring-wise sorted points is provided in A305575 for x and A305576 for y.
%C A308080 The sequence is a permutation of the integers.
%H A308080 Hugo Pfoertner, <a href="/A308080/b308080.txt">Table of n, a(n) for n = 0..10000</a>
%o A308080 (PARI) /* It is assumed that the files a305575 and a305576 contain the second column of the corresponding b-files omitting the initial 0 */
%o A308080 a305575=readvec(a305575); a305576=readvec(a305576);
%o A308080 a174344=vector(10000);L=0; d=1; n=0;
%o A308080 for(r=1, 100, d=-d; k=floor(r/2)*d; for(j=1, L++, a174344[n++]=k); forstep(j=k-d, -floor((r+1)/2)*d+d, -d, a174344[n++]=j));
%o A308080 a274923=vector(10100);L=1; d=1;n=0;
%o A308080 for(r=1, 100, d=-d; k=floor(r/2)*d; for(j=1, L++, a274923[n++]=k); forstep(j=k-d, -floor((r+1)/2)*d+d, -d, a274923[n++]=j));
%o A308080 findinspiral(i, j)={my(size=(2*max(abs(i), abs(j))+1)^2); forstep(k=size, 1, -1, if(i==a174344[k]&&j==a274923[k], return(k)))};
%o A308080 print1(findinspiral(0,0),", ");for(n=1,67,print1(findinspiral(a305575[n],a305576[n]),", "));
%Y A308080 Cf. A174344, A274923, A305575, A305576, A308081.
%K A308080 nonn
%O A308080 0,2
%A A308080 _Hugo Pfoertner_, May 11 2019