login
A319561
Let f(1) = 1, f(2) = 1 + i (where i denotes the imaginary unit), and for n > 1, f(n+1) is the Gaussian integer in the first quadrant (with positive real part and nonnegative imaginary part) with least modulus and sharing a prime factor with f(n) (in case of a tie, minimize the imaginary part); a(n) = the square of the modulus of f(n).
4
1, 2, 4, 8, 10, 5, 20, 10, 5, 20, 16, 18, 9, 36, 26, 13, 52, 26, 13, 52, 32, 34, 17, 68, 34, 17, 68, 40, 25, 25, 45, 45, 25, 40, 50, 50, 50, 58, 29, 116, 58, 29, 116, 64, 72, 74, 37, 148, 74, 37, 148, 80, 65, 65, 65, 65, 85, 85, 85, 80, 82, 41, 164, 82, 41
OFFSET
1,2
COMMENTS
The real and imaginary parts of f are respectively given by A319562 and A319563.
The sequence f is a complex variant of the EKG sequence (A064413).
This sequence and A064413 have similar graphical features.
Apparently, the sequence f runs through all Gaussian integers in the first quadrant.
FORMULA
a(n) = A319562(n)^2 + A319563(n)^2.
EXAMPLE
The first terms, alongside f(n) and gcd(f(n), f(n+1)), are:
n a(n) f(n) gcd(f(n), f(n+1))
-- ---- ---- -----------------
1 1 1 1
2 2 1 + i 1 + i
3 4 2 2
4 8 2 + 2*i 1 + i
5 10 3 + i 1 + 2*i
6 5 1 + 2*i 1 + 2*i
7 20 2 + 4*i 1 + i
8 10 1 + 3*i 2 + i
9 5 2 + i 2 + i
10 20 4 + 2*i 2
11 16 4 1 + i
12 18 3 + 3*i 3
13 9 3 3
14 36 6 1 + i
15 26 5 + i 2 + 3*i
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Sep 23 2018
STATUS
approved