login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Prime numbers with every digit a perfect square, i.e., consisting of only digits 0, 1, 4, 9.
9

%I #13 Sep 22 2019 15:05:38

%S 11,19,41,101,109,149,191,199,401,409,419,449,491,499,911,919,941,991,

%T 1009,1019,1049,1091,1109,1409,1499,1901,1949,1999,4001,4019,4049,

%U 4091,4099,4111,4409,4441,4909,4919,4999,9001,9011,9041,9049,9091,9109,9199

%N Prime numbers with every digit a perfect square, i.e., consisting of only digits 0, 1, 4, 9.

%H Chai Wah Wu, <a href="/A061246/b061246.txt">Table of n, a(n) for n = 1..10000</a>

%H R. Ondrejka, <a href="http://www.utm.edu/research/primes/lists/top_ten/">The Top Ten: a Catalogue of Primal Configurations</a>.

%e a(10) = 419, 419 is a prime and 1, 4 and 9 are squares.

%t Select[FromDigits/@Tuples[{0,1,4,9},4],PrimeQ] (* _Harvey P. Dale_, Sep 22 2019 *)

%o (Python)

%o from itertools import product

%o from sympy import isprime

%o A061246_list = [int(i+''.join(j)+k) for l in range(10) for i in '149' for j in product('0149',repeat=l) for k in '19' if isprime(int(i+''.join(j)+k))] # _Chai Wah Wu_, Jan 19 2019

%Y Cf. A066591.

%K base,nonn

%O 1,1

%A _Amarnath Murthy_, Apr 23 2001

%E Corrected and extended by _Jason Earls_, May 17 2005

%E Edited by _N. J. A. Sloane_, Aug 29 2008 at the suggestion of _R. J. Mathar_