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.
%I A380188 #9 Jan 16 2025 20:22:10 %S A380188 0,1,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,5,6,6,6,7,7,7,7,8,8,9,10, %T A380188 11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12, %U A380188 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12 %N A380188 a(n) is the maximum number of coincidences of the first n terms of this sequence and a cyclic shift of the first n terms of A380189, i.e., the number of equalities a(k) = A380189((s+k) mod n) for 0 <= k < n, maximized over s. %C A380188 Is a(n+1)-a(n) always 0 or 1? %C A380188 Consider a pair of sequences b and c defined in the following manner: %C A380188 - b(n) is the number of coincidences of the first n terms of sequences b and c, %C A380188 - c(n) is the number of coincidences of the first n terms of sequence b and the first n terms of sequence c in reverse order. %C A380188 (The sequences are "self-starting" with no initial values required, because for n = 0 there are obviously no coincidences, so b(0) = c(0) = 0.) For each of b and c, we may or may not allow circular shifts and maximize the number of coincidences over all such shifts, so there are four versions: %C A380188 - No shifts: (b,c) = (A379265,A379266). %C A380188 - Shifts in b but not in c: (b,c) = (A380188,A380189). %C A380188 - Shifts in c and either shifts or no shifts in b: In both these cases, b and c are the following sequences, which are constant from n = 5 and n = 7, respectively: %C A380188 b: 0, 1, 2, 3, 3, 4, 4, 4, 4, 4, ... %C A380188 c: 0, 1, 2, 1, 3, 2, 2, 3, 3, 3, ... %H A380188 Pontus von Brömssen, <a href="/A380188/b380188.txt">Table of n, a(n) for n = 0..20000</a> %e A380188 The first time the shift comes into play is for n = 21. The first 21 terms of this sequence and of A380189 are: %e A380188 0, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 %e A380188 0, 1, 0, 2, 0, 1, 1, 2, 1, 0, 3, 1, 0, 2, 0, 2, 2, 2, 2, 3, 3 %e A380188 ^ ^ ^ ^ %e A380188 with only 4 coincidences. But if the second row is shifted 7 steps to the right, we get: %e A380188 0, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 %e A380188 0, 2, 2, 2, 2, 3, 3, 0, 1, 0, 2, 0, 1, 1, 2, 1, 0, 3, 1, 0, 2 %e A380188 ^ ^ ^ ^ ^ %e A380188 with 5 coincidences. This is the best possible, so a(21) = 5. %Y A380188 Cf. A272727, A276638, A379265, A379266, A380189, A380190. %K A380188 nonn %O A380188 0,3 %A A380188 _Pontus von Brömssen_, Jan 15 2025