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 A330239 #21 Jan 16 2024 01:40:42 %S A330239 0,0,1,2,3,4,3,4,5,6,5,6,7,8,7,8,9,10,9,10,11,12,11,12,13,14,15,14,15, %T A330239 16,15,16,17,18,17,18 %N A330239 Minimum circular (strong) similarity of a length-n binary word. %C A330239 The circular (strong) similarity of a word w is the maximum, over all nontrivial cyclic shifts x of w, of the number of positions where x and w agree. %C A330239 The plausible identification of this sequence with A285869, A162330, A183041 is just illusory because a(27) = 15. %C A330239 Circular (strong) similarity is basically a one-sided version of autocorrelation, where we only care about agreement of terms, not the difference between agreement and disagreement. %H A330239 Michael S. Branicky, <a href="/A330239/a330239.txt">Python program</a> %e A330239 For n = 7, one string achieving a(7) = 3 is 0001011. %o A330239 (Python) # see links for faster version %o A330239 from itertools import product %o A330239 def css(k, n): %o A330239 cs = ((k>>i) | ((((1<<i)-1)&k)<<(n-i)) for i in range(1, n)) %o A330239 return max(n-(k^t).bit_count() for t in cs) %o A330239 def a(n): return min(css(k, n) for k in range(2**(n-1), 2**n)) if n>1 else 0 %o A330239 print([a(n) for n in range(1, 16)]) # _Michael S. Branicky_, Jan 15 2024 %Y A330239 Cf. A162330, A183041, A285869. %K A330239 nonn,more %O A330239 1,4 %A A330239 _Jeffrey Shallit_, Dec 06 2019 %E A330239 a(31)-a(36) from _Michael S. Branicky_, Jan 15 2024