OFFSET
1,2
LINKS
EXAMPLE
5^3 = 111(1)101_2, 28^3 = 1010101(1)1000000_2, 111^3 = 1010011011(1)1001001111_2.
MATHEMATICA
a[n_]:=Part[IntegerDigits[n, 2], (Length[IntegerDigits[n, 2]]+1)/2];
Select[Range[0, 259], OddQ[Length[IntegerDigits[#^3, 2]]] && a[#^3]==1 &] (* Indranil Ghosh, Mar 06 2017 *)
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 *)
PROG
(PARI)
isok(k) = my(d=digits(k^3, 2)); (#d%2 == 1) && (d[#d\2 +1] == 1);
for(k=0, 259, if(isok(k)==1, print1(k, ", "))); \\ Indranil Ghosh, Mar 06 2017
(Python)
i=0
j=1
while i<=259:
....n=str(bin(i**3)[2:])
....l=len(n)
....if l%2==1 and n[(l-1)/2]=="1":
........print (str(i))+", ",
........j+=1
....i+=1 # Indranil Ghosh, Mar 06 2017
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Lars Blomberg, Jan 12 2017
STATUS
approved