OFFSET
1,3
COMMENTS
See A290537 for the imaginary part of the n-th term of S.
See A290538 for the square of the norm of the n-th term of S.
The representation of the first terms of S in the complex plane has nice fractal features (see also Links section).
The sequence S is a "complex" variant of A232559.
The sequence S is a permutation of the Gaussian integers (Z[i]):
- let u be the function defined over Z[i] by z -> z+1,
- let v be the function defined over Z[i] by z -> z*(1+i),
- for m, n, o, p and q >= 0,
let f(m,n,o,p,q) = u^m(v(u^n(v(u^o(v(v(u^p(v(v(u^q(0)))))))))))
(where w^k denotes the k-th iterate of w),
- f(m,0,0,0,0) = m, and any nonnegative integer x can be represented in this way for some m >= 0,
- f(m,n,0,0,0) = m+n + n*i, and any Gaussian integer x+y*i with 0 <= x and 0 <= y <= x can be represented in this way for some m and n >= 0,
- f(m,n,o,0,0) = f(m,n,0,0,0) + 2*o*i, and any Gaussian integer x+y*i with 0 < x and 0 <= y can be represented in this way for some m, n and o >= 0,
- f(m,n,o,p,0) = f(m,n,o,0,0) - 4*p, and any Gaussian integer x+y*i with 0 <= y can be represented in this way for some m, n, o and p >= 0,
- f(m,n,o,p,q) = f(m,n,o,p,0) - 8*q*i, and any Gaussian integer x+y*i can be represented in this way for some m, n, o, p and q >= 0,
- in other words, any Gaussian integer can be reached from 0 after a finite number of steps chosen in { u, v }, QED.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, PARI program for A290536
Wikipedia, Gaussian integer
EXAMPLE
S(1) = 0 by definition; so a(1) = 0.
S(1)+1 = 1 has not yet occurred; so S(2) = 1 and a(2) = 1.
S(1)*(i+i) = 0 has already occurred.
S(2)+1 = 2 has not yet occurred; so S(3) = 2 and a(3) = 2.
S(2)*(1+i) = 1+i has not yet occurred; so S(4) = 1+i and a(4) = 1.
S(3)+1 = 3 has not yet occurred; so S(5) = 3 and a(5) = 3.
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
sign,look
AUTHOR
Rémy Sigrist, Aug 05 2017
STATUS
approved