OFFSET
1,4
COMMENTS
The definition implies that the sequence is infinite, and a(n+1) < n for all n. Conjecture: Zero occurs infinitely many times.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Scatterplot of a(n) for 1 <= n <= 2^16.
Michael De Vlieger, Scatterplot of a(n) for 1 <= n <= 2^16, with even n shown in red and odd n shown in blue.
EXAMPLE
a(1)=1, the first novel term. The number of prior terms > 1 is 0, so a(2)=0. a(3) = 1, because a(2) = 0 is a novel term and there is only one term (a(1)=1)>0. Since a(3) = 1 has been seen before a(4)= 2, the number of prior terms (1,0) which are <=1.
MATHEMATICA
Block[{a = {1}, k}, Do[k = a[[-1]]; AppendTo[a, If[FreeQ[Most@ a, k], Count[a, _?(# > k &)], -1 + Count[a, _?(# <= k &)]]], 57]; a] (* Michael De Vlieger, Mar 28 2021 *)
CROSSREFS
KEYWORD
nonn,look
AUTHOR
David James Sycamore, Mar 28 2021
STATUS
approved