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 A280642 #13 Dec 23 2024 14:53:45 %S A280642 5,9,103,113,133,146,151,154,165,180,198,202,470,473,493,496,504,507, %T A280642 521,531,538,542,566,569,581,591,593,599,612,618,620,650,654,673,681, %U A280642 686,703,711,715,728,729,732,740,779,801,829,841,850,855,856,857,858,874 %N A280642 Numbers k such that k^3 has an odd number of digits and the middle digit is 2. %C A280642 The sequence of cubes starts: 125, 729, 1092727, 1442897, 2352637, 3112136, 3442951, 3652264, ... %H A280642 Lars Blomberg, <a href="/A280642/b280642.txt">Table of n, a(n) for n = 1..10000</a> %H A280642 Jeremy Gardiner, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2016-December/017135.html">Middle digit in cube numbers</a>, Seqfan Mailing list, Dec 12 2016. %e A280642 5^3 = 1(2)5, 180^3 = 583(2)000, 618^3 = 2360(2)9032. %t A280642 a[n_]:=Part[IntegerDigits[n],(Length[IntegerDigits[n]]+1)/2]; %t A280642 Select[Range[0,874],OddQ[Length[IntegerDigits[#^3]]] && a[#^3]==2 &] (* _Indranil Ghosh_, Mar 06 2017 *) %o A280642 (PARI) %o A280642 isok(k) = my(d=digits(k^3)); (#d%2 == 1) && (d[#d\2 +1] == 2); %o A280642 for(k=0, 874, if(isok(k)==1, print1(k, ", "))); \\ _Indranil Ghosh_, Mar 06 2017 %o A280642 (Python) %o A280642 i=0 %o A280642 j=1 %o A280642 while i<=874: %o A280642 n=str(i**3) %o A280642 l=len(n) %o A280642 if l%2 and n[(l-1)//2]=="2": %o A280642 print(str(i), end=', ') %o A280642 j+=1 %o A280642 i+=1 # _Indranil Ghosh_, Mar 06 2017 %Y A280642 Cf. A280640-A280641, A280643-A280649, A181354. %Y A280642 See A279420-A279429 for a k^2 version. %Y A280642 See A279430-A279431 for a k^2 version in base 2. %K A280642 nonn,base,easy %O A280642 1,1 %A A280642 _Lars Blomberg_, Jan 07 2017