The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A340172 List of Y-coordinates of point moving along one of the arms of a counterclockwise double square spiral; A340171 gives X-coordinates. 3
0, 0, 1, 1, 1, 1, 0, -1, -2, -2, -2, -2, -2, -2, -1, 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 0, -1, -2, -3, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -6, -6, -6 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,9
COMMENTS
The odd function f such that f(n) = (A340171(n), a(n)) for any n >= 0 will visit exactly once every lattice point (so it is a bijection from Z to Z^2).
LINKS
FORMULA
abs(a(n+1)-a(n)) + abs(A340171(n+1)-A340171(n)) = 1.
a(n) = A340171(n) iff n belongs to A001105.
a(n) = - A340171(n) iff n belongs to A046092.
2*a(n) = A340171(n) iff n belongs to A139274.
a(n) = 2*A340171(n) iff n belongs to A139275.
a(n) * A340171(n) = 0 iff n belongs to A000217.
a(n) = 0 iff n belongs to A000384.
EXAMPLE
The spiral starts as follows:
+-----+-----+-----+-----+-----+
. |
. |
. +-----+-----+-----+ +
. |5 4 3 |2 |
. | | |
+ +-----+-----+ +
|6 | 0 1 | .
| | | .
+ +-----+-----+-----+ .
|7 .
| .
+-----+-----+-----+-----+-----+
8 9 10 11 12 13
- so a(0) = a(1) = a(6) = 0,
- a(2) = a(3) = a(4) = a(5) = 1.
PROG
(PARI) See Links section.
CROSSREFS
Sequence in context: A211666 A297037 A127322 * A163529 A283655 A262742
KEYWORD
sign
AUTHOR
Rémy Sigrist, Dec 30 2020
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 June 4 19:35 EDT 2024. Contains 373102 sequences. (Running on oeis4.)