OFFSET
0,4
COMMENTS
This is a sequence of Gaussian integers - complex numbers a+bi, such that both a and b are integers. It is a complex analog of the Recamán sequence. Starting with n(0)=0 (0+0i), each subsequent value is an absolute distance n away from the previous value. The following restrictions are applied:
* For each value a+bi, both a and b must be nonnegative.
* The specific value chosen is the one with the shortest absolute distance from the origin (0+0i).
* In the case of a value where a and b are equal, both (a+n)=bi and a+(b+n)i will be equally close to the origin, so the arbitrary decision is made to increase the real value. If the opposite decision is made, the sequence is the same, reflected across the a+ai diagonal (switching the sequence of the real parts and the imaginary parts). As far as this author has been able to trace the sequence so far, the only place where this happens is at n(0)=0, so n(1)=1 (instead of i).
This is the sequence of the real, or "a" values of these Gaussian integers. The imaginary, "b" values are found in sequence A337358.
The original Recamán sequence has the added restriction that when making a step toward 0, the number arrived at cannot have previously appeared in the sequence. If this restriction is lifted for the Recamán sequence, it becomes far less interesting, and forms a predictable pattern. For this complex version of the Recamán sequence, not including this restriction does not render the sequence uninteresting. The two-dimension plane (one quarter of it) provides plenty of space for the sequence to expand into. Even when a number is revisited, the sequence still does not fall into a predictable pattern. Therefore, no such restriction was placed on this sequence.
LINKS
Samuel Harkness, Table of n, a(n) for n = 0..10000
Samuel Harkness, MATLAB program
EXAMPLE
After the initial value 0 (0+0i), the next term is 1+0i, being a distance of 1 away from the previous value. The next term is 1+2i, being a distance of 2 away from the previous term, and closer to the origin point than 3+0i. 3+0i is 3 away from the origin, while 1+2i is only sqrt(5), ~2.236 away from the origin.
The next term is then 4+2i, being 3 away from the previous term, and closer to the origin than 1+5i.
The next term is 0+2i, being 4 away from the previous term, and getting much closer to the origin.
The next term is 5+2i. And so on.
Eventually, the sequence comes to the term 4+10i, being 12 away from the previous term. The term after that is 16+5i, being exactly 13 away, and taking advantage of the 5,12,13 Pythagorean Triple. Of all the Gaussian integers 13 away from the previous term 4+10i, and with nonnegative real and imaginary parts, 16+5i is the one closest to the origin.
At many points in this sequence, a diagonal leap is made along one of the Pythagorean hypotenuses.
PROG
(MATLAB) See Links section.
CROSSREFS
AUTHOR
Philip Fleischmann, Jun 22 2020
STATUS
approved