OFFSET
1,3
COMMENTS
The binary complement of every square is in the sequence. Using that might ease computation. - David A. Corneth, Jan 08 2019
EXAMPLE
The binary complement of 22 is 9. Because 9 is a square, 22 is in the sequence.
The binary complement of 4^2 = 16 is 15 so 15 is in the sequence. - David A. Corneth, Jan 08 2019
MAPLE
q:= n-> issqr(Bits[Nand](n$2)):
select(q, [$0..1000])[]; # Alois P. Heinz, Sep 03 2021
MATHEMATICA
Select[Range@ 700, IntegerQ@ Sqrt@ FromDigits[IntegerDigits[#, 2] /. {0 -> 1, 1 -> 0}, 2] &] (* Michael De Vlieger, Jan 04 2019 *)
PROG
(PARI) bc(n) = bitxor(n, 2^(1+logint(max(n, 1), 2))-1); \\ A035327
isok(n) = issquare(bc(n)); \\ Michel Marcus, Jan 04 2019
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Alex Ratushnyak, Jan 03 2019
STATUS
approved