login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A343630 Coordinate triples (x(n), y(n), z(n); n >= 0) of the 3D spiral filling space with shells of increasing radius, using circles at fixed z-values which alternatingly move up and down as do the x-values. 6
0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1, 0, 0, 0, -1, 1, 0, -1, 0, 1, -1, -1, 0, -1, 0, -1, -1, 1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 0, 1, 0, 1, 1, -1, 0, 1, 0, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 0, 0, -2, 2, 0, 0, 0, 2, 0, -2, 0, 0, 0, -2, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,84

COMMENTS

This is a 3D generalization of a plane filling spiral using the Euclidean norm.

See A343640 for an analog using the sup- or oo-norm, where circles are squares and spheres are cubes.

The integer lattice points, Z^3, are listed in order of increasing Euclidean distance R^2 = x^2 + y^2 + z^2 from the origin. Each shell of given radius is filled using circles located at given latitude (i.e., z-value) on the sphere, and each circle is filled by points with increasing longitude, where the positive x axis corresponds to longitude 0. The latitudes / z-values are alternately increasing and decreasing (so over a period of two shells they follow the same cosine-type shape as the x-values do over the period of each circle).

The sequence can be seen as a table with row length of 3, where each row corresponds to the (x,y,z)-coordinates of one point (the three columns are then A343631, A343632 and A343633), or as a table with row lengths 3*A005875, where A005875(r) is the number of points at distance sqrt(r) from the origin.

Sequence A343640 gives a square spiral variant.

LINKS

Table of n, a(n) for n=0..97.

EXAMPLE

Shell r = 0 is the origin, {(0,0,0)}.

Shell r = 1 contains the 6 points {(0,0,1), (1,0,0), (0,1,0), (-1,0,0), (0,-1,0), (0,0,-1)}, located on the North pole, equator and South pole of the unit sphere. The equator (as all circles in the sequel) is "scanned" by increasing longitude = polar coordinate phi in the (x,y) plane with given z, where (x,y,z) = (R,0,0) has longitude 0.

Shell r = R^2 = 2 contains the 12 points (now in order of increasing z-coordinate) {(1,0,-1), (0,1,-1), (-1,0,-1), (0,-1,-1); (1,1,0), (-1,1,0), (-1,-1,0), (1,-1,0); (1,0,1), (0,1,1), (-1,0,1), (0,-1,1)}.

Then again, the points of shell r = R^2 = 3 are ordered by decreasing z-coordinate.

There are no points in shell r = R^2 = 7 = A004215(1), so from there on up to the next empty shell, the shells with even r are filled by decreasing z-coordinate.

PROG

(PARI) A343630_row(n, dir=(-1)^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])*dir, 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])))} \\ returns row n of the table, i.e., the list of points (x, y, z) in Z^3 with Euclidean norm equal to sqrt(n), sorted by increasing latitude for dir = +1, else decreasing, and increasing longitude.

A343630_vec=concat([[Vec(P) | P<-A343630_row(n)] | n<-[0..6]]) \\ beyond the empty row 7 one must correct the second argument, e.g. by using {... P<-S=A343630_row(n, d)]+(#S&&!d*=-1) ...} to flip the sign of d, initialized to 1, at each nonempty shell.

CROSSREFS

Cf. A343631, A343632, A343633 (list of x, y resp. z-coordinates only).

Cf. A343640, A343641, A343642, A343643 (variant using the sup norm => square spiral).

Cf. A342561, A342562, A342563 for a variant which scans each sphere by increasing z.

Cf. A005875 (number of points on a shell with given radius).

Cf. A004215 (numbers that can't be written as sum of 3 squares => empty shells).

Sequence in context: A116856 A140344 A279479 * A318584 A177338 A024158

Adjacent sequences:  A343627 A343628 A343629 * A343631 A343632 A343633

KEYWORD

sign

AUTHOR

M. F. Hasler, Apr 28 2021

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 6 15:30 EDT 2022. Contains 355110 sequences. (Running on oeis4.)