# [seqfan] Re: Anyone have a 3-D "Ulam" spiral?

M. F. Hasler oeis at hasler.fr
Wed Apr 28 22:06:50 CEST 2021

On Wed, Apr 28, 2021 at 4:52 AM Jan Ritsema van Eck <
j.ritsemavaneck at planet.nl> wrote:

> If a double spiral is allowed, you can do without the diagonal step. The
> first branche goes to the top face, the second one to the bottom face, and
> then they spiral towards each other in the way described by Kevin. They
> meet in the middle, at the centres of two opposing side faces. They move
> out one step and fill the next shell in similar fashion, continuing the
> same movement and "spiralling in" to the centres of the top and bottom
> faces.
>

Exactly, I agree!
If I'm not wrong, this is exactly my variant(*)  of Hugo's proposal
(* in that z is scanned once from -R to R, then from +(R+1) to -(R+1), etc
--
actually very similar if not exactly how the x and y coordinates behave: in
(co)sine waves),
when the 2-norm is replaced by the sup- or oo-norm (circles become squares),
with an additional "tie-breaker" that ensures that the starting face and
the ending face of each (cubic) shell are filled with increasingly large
resp. increasingly small squares (= oo-norm circles).
The projection of the two solutions on the z=0 plane are "similar"(mutatis
mutandis) and what one should expect.
I think this is the most natural generalization of (round or square)
2D-spirals.

(PS: I write this also to apologize to those who worried about the data I
put at the end of my earlier mail - it was indeed incorrect:
The points of the circles were (obviously !) not in the "increasing phi"
order, because I have done one simplification too much to my
comparison function in the version I sent without double-checking
the result once again... I put the correct code in Hugo's sequence, up to
the detail that there is no "dir(ection)" switch to flip up/down every
other shell.)

I think we should add these two spirals (maybe as list of triples : (x0,
y0, z0; x1, y1, z2; ...) ?),
(for the 2-norm and for the sup norm ; maybe also for the 1-norm ?) also to
OEIS,
and I will do that unless somebody already started the job.

- Maximilian

Jan
>
> > Op 28 apr. 2021, om 02:11 heeft Kevin Ryde via SeqFan <
> seqfan at list.seqfan.eu> het volgende geschreven:
> >
> > primeness at borve.org (Neil Fernandez) writes:
> >>
> >> 3D Ulam spiral
> >
> > Maybe similar thing expressed a different way?:  On a cube make a
> > horizontal spiral outwards on the top face, horizontal loops around to
> > traverse the sides, and a horizontal spiral inwards on the bottom face.
> > Then next layer by step down and spiral outwards on the bottom face, etc.
> >
> > I think this needs at least 1 diagonal step in the loops so as to make
> > the spiral-inwards begin at a corner.  A diagonal step is unlike the 2D
> > spiral of course.  Could have every loop-around take a diagonal step at
> > its end so each loop begins on a corner.
>