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 A112510 #18 Jul 24 2025 16:54:47 %S A112510 0,2,6,12,28,56,116,244,488,984,2008,4016,8048,16240,32480,64968, %T A112510 129992,261064,522128,1044264,2088552,4177512,8371816,16743632, %U A112510 33487312,66976208,134085072,268170144,536340304,1072680624,2145361584,4290748080,8585715376,17171430752 %N A112510 Least n-bit number whose binary representation's substrings represent the maximal number (A112509(n)) of distinct integers. %C A112510 See A112509 for a full explanation and example. %H A112510 Martin Fuller, <a href="/A112510/b112510.txt">Table of n, a(n) for n = 1..80</a> %H A112510 2008/9 British Mathematical Olympiad Round 2, <a href="http://www.bmoc.maths.org/home/bmo2-2009.pdf">Problem 4</a>, Jan 29 2009. %o A112510 (Python) %o A112510 from itertools import product %o A112510 def c(w): %o A112510 return len(set(w[i:j+1] for i in range(len(w)) if w[i] != "0" for j in range(i,len(w)))) + int("0" in w) %o A112510 def a(n): %o A112510 if n == 1: return 0 %o A112510 m = -1 %o A112510 for b in product("01", repeat=n-1): %o A112510 v = c("1"+"".join(b)) %o A112510 if v > m: %o A112510 m, argm = v, int("1"+"".join(b), 2) %o A112510 return argm %o A112510 print([a(n) for n in range(1, 21)]) # _Michael S. Branicky_, Jan 13 2023 %Y A112510 Cf. A112509 (corresponding maximum), A112511 (greatest n-bit number for which this maximum occurs). %Y A112510 A078822, A122953, A156022, A156023, A156024, A156025. [From _Joseph Myers_, Feb 01 2009] %K A112510 base,nonn %O A112510 1,2 %A A112510 _Rick L. Shepherd_, Sep 09 2005 %E A112510 a(21)-a(31) from _Joseph Myers_, Feb 01 2009 %E A112510 a(32) onwards from _Martin Fuller_, Jul 24 2025