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
Rémy Sigrist, Table of n, a(n) for n = 0..10000
Rémy Sigrist, PARI program for A340172
FORMULA
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
KEYWORD
sign
AUTHOR
Rémy Sigrist, Dec 30 2020
STATUS
approved