login
"Binary prime squares": values of k for which k^2, expressed in base two and read as a decimal number, is a prime.
4

%I #19 May 23 2021 18:07:07

%S 29,39,51,53,67,85,87,107,135,181,189,235,253,297,351,375,379,445,449,

%T 493,583,599,613,701,715,725,739,749,769,781,831,841,847,853,921,953,

%U 1007,1093,1273,1339,1443,1511,1543,1569,1575,1587,1619,1681,1697,1705

%N "Binary prime squares": values of k for which k^2, expressed in base two and read as a decimal number, is a prime.

%H Harvey P. Dale, <a href="/A108325/b108325.txt">Table of n, a(n) for n = 1..1000</a>

%e a(3)=51 because 51^2 = 2601 is the third perfect square whose binary representation 101000101001 read as the decimal one 101000101001 is prime.

%p a:=proc(n) if isprime(convert(n^2,binary))=true then n else fi end: seq(a(n),n=1..2400); # _Emeric Deutsch_, Jul 04 2005

%t Select[Range[1800],PrimeQ[FromDigits[IntegerDigits[#^2,2]]]&] (* _Harvey P. Dale_, May 23 2021 *)

%o (PARI) isok(n) = isprime(fromdigits(binary(n^2))); \\ _Michel Marcus_, Sep 24 2018

%Y Cf. A108322, A108323, A108324.

%K easy,nonn,base

%O 1,1

%A _Alexandre Wajnberg_, Jun 30 2005

%E More terms from _Emeric Deutsch_, Jul 04 2005