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.
%I A342561 #28 May 01 2021 18:27:44 %S A342561 0,0,1,0,-1,0,0,1,0,-1,0,1,-1,-1,1,1,0,-1,0,1,-1,-1,1,1,-1,-1,1,0,2,0, %T A342561 -2,0,0,1,0,-1,0,2,0,-2,0,2,1,-1,-2,-2,-1,1,2,2,0,-2,0,1,0,-1,0,1,-1, %U A342561 -1,1,2,1,-1,-2,-2,-1,1,2,2,1,-1,-2,-2,-1,1,2,1,-1,-1,1,2,0,-2,0,2,-2,-2,2,2,0,-2,0 %N A342561 List points (x,y,z) having integer coordinates, sorted first by R^2 = x^2 + y^2 + z^2 and in case of ties, then by z and last by polar angle 0 <= phi < 2*Pi in a polar coordinate system. Sequence gives x-coordinates. %C A342561 This is a 3-dimensional generalization of A305575 and A305576. %C A342561 y-coordinates are in A342562, z-coordinates are in A342563. %C A342561 These lists can be read as an irregular table, where row r lists the respective coordinates of the points on the sphere with radius R = sqrt(r); their number (i.e., the row length) is given by A005875 = (1, 6, 12, 8, 6, 24, 24, 0, 12, 30, ...). - _M. F. Hasler_, Apr 27 2021 %H A342561 Hugo Pfoertner, <a href="/A342561/b342561.txt">Table of n, a(n) for n = 0..10130</a> %e A342561 n x y z R^2 phi/Pi %e A342561 0 0 0 0 0 0.000 %e A342561 1 0 0 -1 1 0.000 %e A342561 2 1 0 0 1 0.000 %e A342561 3 0 1 0 1 0.500 %e A342561 4 -1 0 0 1 1.000 %e A342561 5 0 -1 0 1 1.500 %e A342561 6 0 0 1 1 0.000 %e A342561 7 1 0 -1 2 0.000 %e A342561 8 0 1 -1 2 0.500 %e A342561 9 -1 0 -1 2 1.000 %e A342561 10 0 -1 -1 2 1.500 %e A342561 11 1 1 0 2 0.250 %e A342561 12 -1 1 0 2 0.750 %e A342561 13 -1 -1 0 2 1.250 %e A342561 14 1 -1 0 2 1.750 %e A342561 15 1 0 1 2 0.000 %e A342561 16 0 1 1 2 0.500 %e A342561 17 -1 0 1 2 1.000 %e A342561 18 0 -1 1 2 1.500 %e A342561 19 1 1 -1 3 0.250 %e A342561 20 -1 1 -1 3 0.750 %e A342561 21 -1 -1 -1 3 1.250 %e A342561 22 1 -1 -1 3 1.750 %e A342561 23 1 1 1 3 0.250 %e A342561 24 -1 1 1 3 0.750 %e A342561 25 -1 -1 1 3 1.250 %e A342561 26 1 -1 1 3 1.750 %e A342561 27 0 0 -2 4 0.000 %e A342561 28 2 0 0 4 0.000 %e A342561 29 0 2 0 4 0.500 %o A342561 (PARI) shell(n, Q=Qfb(1,0,1), L=List())={for(z=if(n, sqrtint((n-1)\3)+1), sqrtint(n), my(S=if(n>z^2, Set(apply(vecsort, abs(qfbsolve(Q, n-z^2, 3)))), [[0,0]])); foreach(S, s, forperm(concat(s,z), p, listput(L, p)))); for(i=1,3, for(j=1,#L, my(X=L[j]); (X[i]*=-1) && listput(L,X))); vecsort(L, (p,q)->if( p[3]!=q[3], p[3]-q[3], p[1]==q[1], q[2]-p[2], p[2]*q[2]<0, q[2]-p[2], (q[1]-p[1])*(p[2]+q[2])))} \\ Gives list of all points with Euclidean norm sqrt(n). %o A342561 A342561_vec=concat([[P[1] | P <- shell(n)] | n<-[0..7]]) \\ _M. F. Hasler_, Apr 27 2021 %Y A342561 Cf. A005875, A117609, A305575, A305576, A342562, A342563. %Y A342561 Cf. A343630, A340631, A340632, A343633 for a variant which "connects" corresponding poles of successive shells, A343640, A340641, A340642, A343643 for a square spiral variant. %K A342561 sign %O A342561 0,29 %A A342561 _Hugo Pfoertner_, Apr 27 2021