OFFSET

1,4

COMMENTS

The sequence has chaotic features (see plot in Links section).

LINKS

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

Rémy Sigrist, Density plot of the first 25000000 terms

EXAMPLE

The first terms, alongside u and v, are:

n a(n) u v

-- ---- - -

1 0 1 0

2 1 1 0

3 1 2 0

4 2 1 0

5 1 3 1

6 2 2 0

7 2 3 0

8 3 1 0

9 1 4 3

10 1 5 3

PROG

(PARI) for (n=1, #(a=vector(85)), print1 (a[n]=if (n==1, 0, sum(k=1, n-1, (a[k]==a[n-1])-(a[k]==a[n-1]+1)))", "))

CROSSREFS

KEYWORD

sign,look

AUTHOR

Rémy Sigrist, Nov 26 2019

STATUS

approved