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 A280651 #16 May 22 2025 10:21:45 %S A280651 1,5,7,11,18,19,20,26,27,28,41,42,45,47,49,66,67,69,70,71,72,73,74,75, %T A280651 76,77,103,106,110,111,113,115,119,120,122,123,124,125,126,162,164, %U A280651 165,166,168,171,177,178,180,181,182,184,185,190,194,197,199,201,259 %N A280651 Numbers k such that k^3 has an odd number of digits in base 2 and the middle digit is 1. %H A280651 Lars Blomberg, <a href="/A280651/b280651.txt">Table of n, a(n) for n = 1..10000</a> %H A280651 <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2016-December/017140.html">Mail by Andrew Weimholt to the Seqfan Mailing list Dec 12 2016</a> %e A280651 5^3 = 111(1)101_2, 28^3 = 1010101(1)1000000_2, 111^3 = 1010011011(1)1001001111_2. %t A280651 a[n_]:=Part[IntegerDigits[n,2],(Length[IntegerDigits[n,2]]+1)/2]; %t A280651 Select[Range[0, 259], OddQ[Length[IntegerDigits[#^3, 2]]] && a[#^3]==1 &] (* _Indranil Ghosh_, Mar 06 2017 *) %t A280651 ond2Q[n_]:=Module[{idn=IntegerDigits[n^3,2],len},len=Length[idn];OddQ[ len] && idn[[(len+1)/2]]==1]; Select[Range[300],ond2Q] (* _Harvey P. Dale_, Jul 21 2021 *) %o A280651 (PARI) %o A280651 isok(k) = my(d=digits(k^3, 2)); (#d%2 == 1) && (d[#d\2 +1] == 1); %o A280651 for(k=0, 259, if(isok(k)==1, print1(k,", "))); \\ _Indranil Ghosh_, Mar 06 2017 %o A280651 (Python) %o A280651 i=0 %o A280651 j=1 %o A280651 while i<=259: %o A280651 n=str(bin(i**3)[2:]) %o A280651 l=len(n) %o A280651 if l%2==1 and n[(l-1)/2]=="1": %o A280651 print (str(i))+",", %o A280651 j+=1 %o A280651 i+=1 # _Indranil Ghosh_, Mar 06 2017 %Y A280651 Cf. A280650. %Y A280651 See A279430-A279431 for a k^2 version. %Y A280651 See A280640-A280649 for a base-10 version. %Y A280651 See A279420-A279429 for a k^2, base-10 version. %K A280651 nonn,base,easy %O A280651 1,2 %A A280651 _Lars Blomberg_, Jan 12 2017