OFFSET
1,2
COMMENTS
All powers of 2 (A000079) are terms. - Michel Marcus, May 06 2016
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..140
EXAMPLE
The binary expansion of 16=2^4 is 10000, its reversal is 1, a square, so 16 is a term.
MATHEMATICA
fQ[n_] := n == 1 || GCD @@ FactorInteger[n][[All, 2]] > 1; Select[Select[Range[2^20], fQ], fQ@ FromDigits[Reverse@ IntegerDigits[#, 2], 2] &] (* Michael De Vlieger, May 05 2016, after Ant King and Robert G. Wilson v at A001597 *)
PROG
(PARI) isp(n) = (n==1) || ispower(n);
isok(n) = isp(n) && isp(subst(Polrev(binary(n)), x, 2)); \\ Michel Marcus, May 06 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Benjamin Przybocki, May 05 2016
STATUS
approved