OFFSET

1,2

COMMENTS

The sequence {m(k)} is 8-periodic:

m(1) = 2 + i,

m(2) = 1 + 2*i, m(3) | m(2)

m(3) = -1 + 2*i, * | *

m(4) = -2 + i, m(4) * | * m(1)

m(5) = -2 - i, ------+------

m(6) = -1 - 2*i, m(5) * | * m(8)

m(7) = 1 - 2*i, * | *

m(8) = 2 - i. m(6) | m(7)

LINKS

Rémy Sigrist, Table of n, a(n) for n = 1..10000

Rémy Sigrist, Illustration of first steps

Rémy Sigrist, Representation of f(n) for n = 0..1000000 in the complex plane (where the color is function of n)

Rémy Sigrist, PARI program for A330780

EXAMPLE

The first terms, alongside the correspond value of f(n), are:

n a(n) f(n)

-- ---- -------

0 N/A 0

1 1 2+i

2 2 4+5*i

3 2 2+9*i

4 2 -2+11*i

5 2 -6+9*i

6 3 -9+3*i

7 3 -6-3*i

8 3 -6*i

9 3 6-3*i

10 3 9+3*i

11 3 6+9*i

12 3 12*i

See also illustration in Links section.

PROG

(PARI) See Links section.

CROSSREFS

KEYWORD

nonn

AUTHOR

Rémy Sigrist, Dec 31 2019

STATUS

approved