cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A383876 a(0) = 0, a(1) = 1. Let n be greatest index such that a(0),...a(n) are already known. If a(n) is not a record term, a(n+1) = number of k < n such that a(k) = a(n). If a(n) is a record term a(n+1) = a(r) where r is the greatest record < a(n).

This page as a plain text file.
%I A383876 #15 May 19 2025 23:03:22
%S A383876 0,1,0,1,1,2,1,3,0,2,1,4,1,5,1,6,2,2,3,1,7,1,8,3,2,4,1,9,0,3,3,4,2,5,
%T A383876 1,10,2,6,1,11,1,12,4,3,5,2,7,1,13,1,14,5,3,6,2,8,1,15,1,16,6,3,7,2,9,
%U A383876 1,17,2,10,1,18,2,11,1,19,3,8,2,12,1,20,1,21
%N A383876 a(0) = 0, a(1) = 1. Let n be greatest index such that a(0),...a(n) are already known. If a(n) is not a record term, a(n+1) = number of k < n such that a(k) = a(n). If a(n) is a record term a(n+1) = a(r) where r is the greatest record < a(n).
%C A383876 After a(5) = 2 a record term produces a string of familiar terms leading to the next record, whereupon the process repeats (see Example). Since each record term increments its predecessor by +1, the records subsequence is A001477. If the first condition in Name is replaced by the "count back" function of A181391 the result is A025480 (n >= 1). The proper subsequence a(r), r a record = 0,1,2,3,..... is identical to the original, therefore the sequence contains infinitely many proper copies of itself. Every nonnegative integer appears infinitely many times.
%H A383876 Michael De Vlieger, <a href="/A383876/b383876.txt">Table of n, a(n) for n = 0..10000</a>
%H A383876 Michael De Vlieger, <a href="/A383876/a383876.png">Log log scatterplot of a(n)</a>, n = 1..2^20, showing a(n) = 0 instead as a(n) = 1/2 for visibility.
%H A383876 Michael De Vlieger, <a href="/A383876/a383876_1.png">Scalar plot of a(n)</a>, n = 1..2^18.
%e A383876 a(1) = 1 is a record term so a(2) = a(0) = 0 since 0 is the greatest record prior to 1. a(2) = 0, which has been seen once already so a(3) = 1, which has also been seen once already so a(4) = 1. Now there are two prior terms = 1, so a(5) = 2, and since this is a new record, a(6) = a(1) since 1 is the greatest record prior to 2. Therefore a(6) = 1. Now 1 has occurred 3 times prior to a(6) so a(7) = 3. The number of repeat terms between consecutive records varies, starting: 0,3,1,3,1,1..
%t A383876 nn = 10000; c[_] := 0; z = a[0] = 0; c[0]++; r = a[1] = 1; q = True;
%t A383876 Do[If[q, k = a[z], k = c[a[n - 1]]];
%t A383876   c[a[n - 1]]++; Set[{a[n], q}, {k, False}];
%t A383876   If[k > r, Set[{z, r, q}, {r, k, True}] ], {n, 2, nn}];
%t A383876 Array[a, nn + 1, 0] (* _Michael De Vlieger_, May 14 2025 *)
%Y A383876 Cf. A001477, A025480, A181391, A346175.
%K A383876 nonn,easy
%O A383876 0,6
%A A383876 _David James Sycamore_, May 13 2025