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.

A380107 a(1) = 0; for n >= 1, if there exists an m < n such that a(m) = a(n), take the largest such m and let a(n+1) be the number of distinct runs in the subsequence a(m)..a(n-1). Otherwise, a(n+1) = 0.

This page as a plain text file.
%I A380107 #22 Jan 24 2025 19:40:59
%S A380107 0,0,1,0,2,0,2,2,1,4,0,4,2,4,2,2,1,5,0,6,0,2,5,4,7,0,5,4,4,1,8,0,5,5,
%T A380107 1,4,5,3,0,6,11,0,3,4,6,5,6,2,12,0,7,13,0,3,9,0,3,3,1,13,6,10,0,6,3,6,
%U A380107 2,11,14,0,6,5,14,4,15,0,6,6,1,13,13,1,2,11,11
%N A380107 a(1) = 0; for n >= 1, if there exists an m < n such that a(m) = a(n), take the largest such m and let a(n+1) be the number of distinct runs in the subsequence a(m)..a(n-1). Otherwise, a(n+1) = 0.
%C A380107 This is a variant of Van Eck's sequence A181391 in which we count distinct runs of consecutive equal values rather than individual terms.
%C A380107 The longest run in the sequence has length 2.
%H A380107 Neal Gersh Tolunsky, <a href="/A380107/b380107.txt">Table of n, a(n) for n = 1..10000</a>
%H A380107 Neal Gersh Tolunsky, <a href="/A380107/a380107.png">Ordinal transform of 100000 terms</a>
%H A380107 Neal Gersh Tolunsky, <a href="/A380107/a380107_1.png">First differences of 100000 terms</a>
%e A380107 a(10)=4: We find that the most recent occurrence of a(n) = a(9) = 1 is a(3) = 1. In between a(3) and a(8), we find 4 distinct runs: [1]; [0]; [2]; [2,2]. So a(10)=4.
%Y A380107 Cf. A380106, A268755.
%K A380107 nonn
%O A380107 1,5
%A A380107 _Neal Gersh Tolunsky_, Jan 12 2025