login
Perfect powers whose binary reversal is also a perfect power.
1

%I #25 May 05 2022 08:05:47

%S 1,4,8,9,16,27,32,36,64,128,144,216,256,512,576,1024,1728,2048,2304,

%T 4096,8192,9216,13824,16384,32768,36864,65536,110592,131072,147456,

%U 262144,524288,589824,884736,1048576,2097152,2359296,4194304,7077888,8388608,9437184,16777216

%N Perfect powers whose binary reversal is also a perfect power.

%C All powers of 2 (A000079) are terms. - _Michel Marcus_, May 06 2016

%H Amiram Eldar, <a href="/A272758/b272758.txt">Table of n, a(n) for n = 1..140</a>

%e The binary expansion of 16=2^4 is 10000, its reversal is 1, a square, so 16 is a term.

%t 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 *)

%o (PARI) isp(n) = (n==1) || ispower(n);

%o isok(n) = isp(n) && isp(subst(Polrev(binary(n)), x, 2)); \\ _Michel Marcus_, May 06 2016

%Y Cf. A000079, A001597, A030101, A118895 (base-10 analog).

%K nonn,base

%O 1,2

%A _Benjamin Przybocki_, May 05 2016