login
A319770
Let f(1) = 1, f(2) = 1 + i (where i denotes the imaginary unit), f(3) = 2 + i, and for n > 2, f(n+1) is the Gaussian integer in the first quadrant (with positive real part and nonnegative imaginary part) with least modulus and sharing at least one prime factor with f(n-1) but none with f(n) (in case of a tie, minimize the imaginary part); a(n) = the square of the modulus of f(n).
3
1, 2, 5, 4, 25, 8, 5, 10, 25, 16, 45, 20, 9, 10, 45, 20, 25, 18, 65, 26, 13, 13, 26, 65, 32, 65, 34, 85, 17, 17, 68, 85, 36, 65, 34, 85, 40, 125, 50, 145, 52, 29, 40, 145, 50, 85, 52, 125, 58, 125, 58, 125, 29, 50, 261, 64, 81, 68, 117, 74, 117, 37, 72, 185
OFFSET
1,2
COMMENTS
The real and imaginary parts of f are respectively given by A319771 and A319772.
The sequence f is a complex variant of the Yellowstone permutation (A098550).
Apparently, the sequence f runs through all Gaussian integers in the first quadrant.
See A319561 for a similar sequence.
FORMULA
a(n) = A319771(n)^2 + A319772(n)^2.
EXAMPLE
The first terms, alongside f(n) and gcd(f(n), f(n+2)), are:
n a(n) f(n) gcd(f(n), f(n+2))
-- ---- ---- -----------------
1 1 1 1
2 2 1 + i 1 + i
3 5 2 + i 2 + i
4 4 2 2
5 25 5 1 + 2*i
6 8 2 + 2*i 1 + i
7 5 1 + 2*i 1 + 2*i
8 10 1 + 3*i 1 + i
9 25 4 + 3*i 1 + 2*i
10 16 4 2
11 45 3 + 6*i 3
12 20 4 + 2*i 1 + i
13 9 3 3
14 10 3 + i 3 + i
15 45 6 + 3*i 2 + i
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Sep 27 2018
STATUS
approved