A267818 Primes whose base-4 representation is a square when read in base 10.
673, 1165921, 6228961, 53378329, 128818873, 805379161, 926711449, 1542173569, 2459671993, 8365652929, 14232980953, 26484614209, 30755887321, 31937961241, 37968797689, 78180076129, 80974979329, 97835803129, 168394504129, 314911422913, 410879716321, 529074406681
Offset: 1
Examples
673 written in base 4 is 22201, and 22201 in base 10 is 149^2.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..100
Programs
-
Mathematica
Select[Prime@ Range[10^6], IntegerQ@ Sqrt@ FromDigits@ IntegerDigits[#, 4] &] (* Michael De Vlieger, Jan 24 2016 *)
-
PARI
is(n, b=4, c=10)=issquare(subst(Pol(digits(n, b)), x, c)) lista(nn) = forprime(p=2, nn, if (is(p), print1(p, ", "))) \\ Michel Marcus, Jan 24 2016
-
Python
from sympy import isprime 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
Extensions
a(8)-a(22) from Chai Wah Wu, Feb 22 2016
Comments