login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A330004 a(1) = 0, and for n > 0, a(n+1) = u - v where u (resp. v) is the number of terms equal to a(n) (resp. a(n)+1) among the first n terms. 2
0, 1, 1, 2, 1, 2, 2, 3, 1, 1, 2, 3, 2, 3, 3, 4, 1, 1, 2, 2, 3, 4, 2, 3, 4, 3, 4, 4, 5, 1, 0, -6, 1, 1, 2, 2, 3, 3, 4, 5, 2, 2, 3, 4, 5, 3, 4, 5, 4, 5, 5, 6, 1, -1, -1, 0, -8, 1, 0, -8, 2, 2, 3, 3, 4, 4, 5, 6, 2, 2, 3, 3, 4, 5, 6, 3, 4, 5, 6, 4, 5, 6, 5, 6, 6 (list; graph; refs; listen; history; text; internal format)
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

See A329981 for similar sequences.

Sequence in context: A037194 A326130 A205510 * A332901 A292583 A330372

Adjacent sequences:  A330001 A330002 A330003 * A330005 A330006 A330007

KEYWORD

sign,look

AUTHOR

Rémy Sigrist, Nov 26 2019

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 21 03:51 EDT 2021. Contains 345354 sequences. (Running on oeis4.)