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 A279430 #22 Dec 23 2024 14:53:45 %S A279430 0,2,4,5,8,9,10,16,17,18,19,22,32,33,34,35,36,37,40,41,44,64,65,66,67, %T A279430 68,69,70,71,76,77,80,81,84,85,87,90,128,129,130,131,132,133,134,135, %U A279430 136,137,138,139,144,145,146,147,151,152,153,156,157,160,161,164 %N A279430 Numbers k such that k^2 has an odd number of digits in base 2 and the middle digit is 0. %H A279430 Lars Blomberg, <a href="/A279430/b279430.txt">Table of n, a(n) for n = 1..10000</a> %H A279430 Andrew Weimholt, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2016-December/017140.html">Middle digit in square numbers</a>, Seqfan Mailing list, Dec 12 2016. %t A279430 a[n_]:=Part[IntegerDigits[n,2],(Length[IntegerDigits[n,2]]+1)/2]; %t A279430 Select[Range[0,164],OddQ[Length[IntegerDigits[#^2,2]]] && a[#^2]==0 &] (* _Indranil Ghosh_, Mar 06 2017 *) %t A279430 k2oQ[n_]:=Module[{idn=IntegerDigits[n^2,2],len},len=Length[idn];OddQ[ len] && idn[[(len+1)/2]]==0]; Select[Range[0,200],k2oQ] (* _Harvey P. Dale_, Jan 29 2020 *) %o A279430 (PARI) isok(k) = my(d=digits(k^2, 2)); (#d%2 == 1) && (d[#d\2 +1] == 0); %o A279430 for(k=0, 164, if(k==0 || isok(k)==1, print1(k,", "))); \\ _Indranil Ghosh_, Mar 06 2017 %o A279430 (Python) %o A279430 i=0 %o A279430 j=1 %o A279430 while i<=164: %o A279430 n=str(bin(i**2)[2:]) %o A279430 l=len(n) %o A279430 if l%2 and n[(l-1)//2]=="0": %o A279430 print(str(i), end=",") %o A279430 j+=1 %o A279430 i+=1 # _Indranil Ghosh_, Mar 06 2017 %Y A279430 Cf. A279431. %Y A279430 See A279420-A279429 for a base-10 version. %K A279430 nonn,base,easy %O A279430 1,2 %A A279430 _Lars Blomberg_, Jan 07 2017