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.

Showing 1-6 of 6 results.

A343633 Z-coordinate of the points following the 3D spiral defined in A343630.

Original entry on oeis.org

0, 1, 0, 0, 0, 0, -1, -1, -1, -1, -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, -2, 0, 0, 0, 0, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, -1, -1, -2, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, -2, -2, -2, -2, -3, -2, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -1, 0
Offset: 0

Views

Author

M. F. Hasler, Apr 28 2021

Keywords

Comments

See the main entry A343630 for details about this 3D generalization of an Ulam type spiral using the Euclidean norm.
Sequences A343631 and A343632 give the x and y-coordinates.
The sequence can be seen as a table with row lengths A005875, where A005875(r) is the number of points at distance sqrt(r) from the origin.
Sequence A343643 is the analog for the square spiral variant A343640.

Crossrefs

Cf. A343631, A343633 (list of x and z-coordinates).
Cf. A343643 (variant using the sup norm => square spiral).
Cf. A342563 (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).

Programs

  • PARI
    d=1; A343633_vec=concat([[P[3] | P<-S=A343630_row(n,d)]+(#S&&!d*=-1) | n<-[0..9]]) \\ the variable d is necessary to correct the z-scan direction in rows between A004215(2k-1) and A004215(2k).

A343631 X-coordinate of the points following the 3D spiral defined in A343630.

Original entry on oeis.org

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, -2, 0, 0, 1, 0, -1, 0, 2, 0, -2, 0, 2, 1, -1, -2, -2, -1, 1, 2, 2, 0, -2, 0, 0, 0, 1, -1, 1, -1, -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, 0, 2, 1, -1, -2, -2, -1, 1, 2, 2, -2, -2, 2, 3, 0, -3, 0
Offset: 0

Views

Author

M. F. Hasler, Apr 28 2021

Keywords

Comments

See the main entry A343630 for details about this 3D generalization of an Ulam type spiral using the Euclidean norm.
Sequences A343632 and A343633 give the y and z coordinates.
The sequence can be seen as a table with row lengths 3*A005875, where A005875(r) is the number of points at distance sqrt(r) from the origin.
Sequence A343641 is the analog for the square spiral variant A343640.

Crossrefs

Cf. A343632, A343633 (list of y and z-coordinates).
Cf. A343641 (variant using the sup norm => square spiral).
Cf. A342561 (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).

Programs

  • PARI
    d=1; A343631_vec=concat([[P[1] | P<-S=A343630_row(n,d)]+(#S&&!d*=-1) | n<-[0..8]]) \\ the variable d is necessary to correct the z-scan direction in rows between A004215(2k-1) and A004215(2k).

A343632 Y-coordinate of the points following the 3D spiral defined in A343630.

Original entry on oeis.org

0, 0, 0, 1, 0, -1, 0, 0, 1, 0, -1, 1, 1, -1, -1, 0, 1, 0, -1, 1, 1, -1, -1, 1, 1, -1, -1, 0, 0, 2, 0, -2, 0, 0, 1, 0, -1, 0, 2, 0, -2, 1, 2, 2, 1, -1, -2, -2, -1, 0, 2, 0, -2, 1, -1, 0, 0, 1, 1, -1, -1, 1, 2, 2, 1, -1, -2, -2, -1, 1, 2, 2, 1, -1, -2, -2, -1, 1, 1, -1, -1, 0, 2, 0, -2, 2, 2, -2, -2, 0, 2, 0, -2, 0, 1, 2, 2, 1, -1, -2, -2, -1, 2, 2, -2, -2, 0, 3, 0, -3
Offset: 0

Views

Author

M. F. Hasler, Apr 28 2021

Keywords

Comments

See the main entry A343630 for details about this 3D generalization of an Ulam type spiral using the Euclidean norm.
Sequences A343631 and A343633 give the x and z coordinates.
The sequence can be seen as a table with row lengths A005875, where A005875(r) is the number of points at distance sqrt(r) from the origin.
Sequence A343642 is the analog for the square spiral variant A343640.

Crossrefs

Cf. A343631, A343633 (list of x and z-coordinates).
Cf. A343642 (variant using the sup norm => square spiral).
Cf. A342562 (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).

Programs

  • PARI
    d=1; A343632_vec=concat([[P[2] | P<-S=A343630_row(n,d)]+(#S&&!d*=-1) | n<-[0..9]]) \\ the variable d is necessary to correct the z-scan direction in rows between A004215(2k-1) and A004215(2k).

A343640 Coordinate triples (x(n), y(n), z(n); n >= 0) of the 3D square spiral filling space with shells of increasing radius for the sup-norm, in turn filled by squares extending from one pole to the opposite one.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, -1, 1, 1, -1, 0, 1, -1, -1, 1, 0, -1, 1, 1, -1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, -1, 1, 0, -1, 0, 0, -1, -1, 0, 0, -1, 0, 1, -1, 0, 1, 0, -1, 1, 1, -1, 0, 1, -1, -1, 1, -1, -1, 0, -1, -1, -1, -1, 0, -1, -1, 1, -1, -1, 0, 0, -1, 0, 0, -2, 1, 0, -2, 1, 1, -2, 0, 1, -2, -1, 1, -2, -1, 0, -2, -1, -1, -2, 0, -1, -2, 1, -1, -2
Offset: 0

Views

Author

M. F. Hasler, Apr 28 2021

Keywords

Comments

This is a 3D generalization of the 2D square spiral and could be used to produce a 3D variant of Ulam's prime spiral.
See A343630 for an analog using the Euclidean or 2-norm instead of the sup- or oo-norm used here, so points are partitioned in spheres and circles instead of squares and cubes here.
The integer lattice points, Z^3, are listed in order of increasing sup norm R = max(|x|, |y|, |z|). Each "sphere" or shell of given radius R is filled starting at the North or South pole using concentric squares on the top and bottom face and squares of fixed size (2R+1) X (2R+1) at intermediate z-coordinates. Each square (circle for the sup-norm) is filled in the sense of increasing longitude, where the positive x axis corresponds to longitude 0, i.e., the points (r,0,z), (0,r,z), (-r,0,z) and (0,-r,z) are visited in this order. The z-values are alternatively increasing and decreasing (so over a period of two shells they follow the same rectangle-wave shape as the x-values do over the period of each square).
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 (then the three columns are A343641, A343642 and A343643), or as a table with row lengths 3*A010014, where A010014(r) is the number of points with sup-norm r.
There are (2n+1)^3 integer lattice points with sup norm <= n. Therefore, the point number n (where 0 is the origin) is in the shell r = round(n^(1/3)/2) = floor(...+1/2). Within shell r, which starts with the point number (2r-1)^3 (except for r=0), the first and last (2r+1)^2 points are on square spirals on the top and bottom faces, and the other points are on 2r-1 squares forming "belts" of 8r points each, on the side faces of the cube.

Examples

			Shell r = 0 is the origin, {(0,0,0)}.
Shell r = 1 contains the 3*3 + 4*2 + 3*3 = 26 points with oo-norm 1, i.e., all points with coordinates within {-1, 0, 1} except for the origin. They are listed in a square spiral starting at the North Pole: (0,0,1), (1,0,1), (1,1,1), (0,1,1), (-1,1,1), (-1,0,1), (-1,-1,1), (0,-1,1), (1,-1,1); then on the equator:  (1,0,0), (1,1,0), (0,1,0), (-1,1,0), (-1,0,0), (-1,-1,0), (0,-1,0), (1,-1,0), and then on the South face using an inward spiral: (1,0,-1), (1,1,-1), (0,1,-1), (-1,1,-1), (-1,0,-1), (-1,-1,-1), (0,-1,-1), (1,-1,-1), (0,0,-1).
Since there are no empty shells, the z-coordinate is always increasing for even r and decreasing for odd r.
		

Crossrefs

Cf. A343641, A343642, A343643 (list of x, y resp. z-coordinates only).
Cf. A343631, A343632, A343633 (variant using the Euclidean norm => circle shaped spirals), A342561, A343632, A342563 (another variant).
Cf. A010014 (number of points on a shell with given radius), A016755.
Cf. A174344, A268038, A274923 (2-dimensional square spiral).

Programs

  • PARI
    A343640_row(n)={local(L=List(), a(r, z, d=I)= if(r, for(i=1,8*r, listput(L,[real(r),imag(r),z]); r+=d; abs(real(r))==abs(imag(r)) && d*=I), listput(L,[0,0,z])), s=(-1)^n /* flip South <-> North for odd n */); /* main prog: (1) square spiral on South face from center to board */ for(d=!n,n, a(d,-s*n)); /* (2) "equatorial(?) bands" from South to North */ for(z=1-n,n-1, a(n,s*z)); /* (3) square spiral on North face ending in pole */ for(d=0,n, a(n-d,s*n)); Vec(L)} \\ row n of the table = list of points (x,y,z) in the shell n, i.e., with sup norm n. [Missing "s*" in a(n,s*z) added on May 27 2021]
    A343640_vec=concat([A343640_row(r) | r<-[0..2]]) \\ From r=0 up to n there are (2n+1)^3 points with 3 coordinates each!

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.

Original entry on oeis.org

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, -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, -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
Offset: 0

Views

Author

Hugo Pfoertner, Apr 27 2021

Keywords

Comments

This is a 3-dimensional generalization of A305575 and A305576.
y-coordinates are in A342562, z-coordinates are in A342563.
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

Examples

			   n    x    y    z  R^2  phi/Pi
   0    0    0    0   0   0.000
   1    0    0   -1   1   0.000
   2    1    0    0   1   0.000
   3    0    1    0   1   0.500
   4   -1    0    0   1   1.000
   5    0   -1    0   1   1.500
   6    0    0    1   1   0.000
   7    1    0   -1   2   0.000
   8    0    1   -1   2   0.500
   9   -1    0   -1   2   1.000
  10    0   -1   -1   2   1.500
  11    1    1    0   2   0.250
  12   -1    1    0   2   0.750
  13   -1   -1    0   2   1.250
  14    1   -1    0   2   1.750
  15    1    0    1   2   0.000
  16    0    1    1   2   0.500
  17   -1    0    1   2   1.000
  18    0   -1    1   2   1.500
  19    1    1   -1   3   0.250
  20   -1    1   -1   3   0.750
  21   -1   -1   -1   3   1.250
  22    1   -1   -1   3   1.750
  23    1    1    1   3   0.250
  24   -1    1    1   3   0.750
  25   -1   -1    1   3   1.250
  26    1   -1    1   3   1.750
  27    0    0   -2   4   0.000
  28    2    0    0   4   0.000
  29    0    2    0   4   0.500
		

Crossrefs

Cf. A343630, A340631, A340632, A343633 for a variant which "connects" corresponding poles of successive shells, A343640, A340641, A340642, A343643 for a square spiral variant.

Programs

  • 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).
    A342561_vec=concat([[P[1] | P <- shell(n)] | n<-[0..7]]) \\ M. F. Hasler, Apr 27 2021

A342563 List points (x,y,z) having integer coordinates, sorted first by R=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 z-coordinates.

Original entry on oeis.org

0, -1, 0, 0, 0, 0, 1, -1, -1, -1, -1, 0, 0, 0, 0, 1, 1, 1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -2, 0, 0, 0, 0, 2, -2, -2, -2, -2, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, -2, -2, -2, -2, 0, 0, 0, 0, 2, 2, 2, 2
Offset: 0

Views

Author

Hugo Pfoertner, Apr 27 2021

Keywords

Examples

			See A342561.
		

Crossrefs

Cf. A305575, A305576, A342561 (x-coordinates), A342562 (y-coordinates).

Programs

Showing 1-6 of 6 results.