The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS 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. 3

%I #13 Nov 29 2019 12:15:52

%S 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,

%T 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,

%U 5,6,2,2,3,3,4,5,6,3,4,5,6,4,5,6,5,6,6

%N 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.

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

%H Rémy Sigrist, <a href="/A330004/b330004.txt">Table of n, a(n) for n = 1..10000</a>

%H Rémy Sigrist, <a href="/A330004/a330004.png">Density plot of the first 25000000 terms</a>

%e The first terms, alongside u and v, are:

%e n a(n) u v

%e -- ---- - -

%e 1 0 1 0

%e 2 1 1 0

%e 3 1 2 0

%e 4 2 1 0

%e 5 1 3 1

%e 6 2 2 0

%e 7 2 3 0

%e 8 3 1 0

%e 9 1 4 3

%e 10 1 5 3

%o (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)))", "))

%Y See A329981 for similar sequences.

%K sign,look

%O 1,4

%A _Rémy Sigrist_, Nov 26 2019

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 18 07:16 EDT 2024. Contains 372618 sequences. (Running on oeis4.)