login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Primes whose base-4 representation is a square when read in base 10.
1

%I #24 Jun 29 2019 02:03:39

%S 673,1165921,6228961,53378329,128818873,805379161,926711449,

%T 1542173569,2459671993,8365652929,14232980953,26484614209,30755887321,

%U 31937961241,37968797689,78180076129,80974979329,97835803129,168394504129,314911422913,410879716321,529074406681

%N Primes whose base-4 representation is a square when read in base 10.

%C Primes in the sequence A267764.

%H Chai Wah Wu, <a href="/A267818/b267818.txt">Table of n, a(n) for n = 1..100</a>

%e 673 written in base 4 is 22201, and 22201 in base 10 is 149^2.

%t Select[Prime@ Range[10^6], IntegerQ@ Sqrt@ FromDigits@ IntegerDigits[#, 4] &] (* _Michael De Vlieger_, Jan 24 2016 *)

%o (PARI) is(n, b=4, c=10)=issquare(subst(Pol(digits(n, b)), x, c))

%o lista(nn) = forprime(p=2, nn, if (is(p), print1(p, ", "))) \\ _Michel Marcus_, Jan 24 2016

%o (Python)

%o from sympy import isprime

%o A267818_list = [int(d,4) for d in (str(i**2) for i in range(1,10**6)) if max(d) < '4' and isprime(int(d,4))] # _Chai Wah Wu_, Feb 22 2016

%Y In other bases: A267817, A267818, A267819, A267820, A267821, A241246, A267490.

%K nonn,base

%O 1,1

%A _Christopher Cormier_, Jan 20 2016

%E a(8)-a(22) from _Chai Wah Wu_, Feb 22 2016