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 A364714 #32 May 20 2024 10:30:19 %S A364714 2,38,141,3468,36990,36990 %N A364714 Least positive integer whose average digit in base b equals (b-1)/2 (the expected value for random digits) for 2 <= b <= n. %C A364714 a(n) has an even number of digits in all even bases b <= n. %C A364714 a(8) <= 795482814912042180, a(9) and a(10) <= 836119295625913740. - _Giorgos Kalogeropoulos_, Aug 09 2023 %C A364714 a(8) and a(9) <= 789730327537467540, a(10) <= 789731071815355740, a(11) <= 789731549802436500. - _Jason Yuen_, May 17 2024 %C A364714 a(8) > A144812(10000) = 16960567248690 (last term in b-file for A144812). - _Pontus von Brömssen_, May 19 2024 %e A364714 For n = 4, 141 is 10001101 in binary with average digit 1/2, 12020 in base 3 with average digit 2/2 = 1, and 2031 in base 4 with average digit 3/2. No smaller number has this property, so a(4) = 141. %o A364714 (PARI) isokb(k, b) = my(d=digits(k,b)); vecsum(d)/#d == (b-1)/2; %o A364714 isok(k, n) = for (b=2, n, if (!isokb(k, b), return(0));); 1; %o A364714 a(n) = my(k=1); while (!isok(k, n), k++); k; \\ _Michel Marcus_, Aug 05 2023 %Y A364714 a(2)-a(7) are the first terms of A031443, A144798, A144799, A144800, A144801, and A144812, respectively. %K A364714 nonn,base,more,hard %O A364714 2,1 %A A364714 _Pontus von Brömssen_, Aug 04 2023