A331346 Primes using all the square digits {0, 1, 4, 9} and no others.
1049, 1409, 4019, 4091, 9041, 10499, 10949, 14009, 49019, 49109, 90149, 90401, 94109, 99041, 99401, 100049, 101149, 101419, 101449, 104009, 104119, 104149, 104491, 104911, 104999, 109049, 109141, 109441, 110419, 110491, 111049, 111409, 114901, 140009, 140191, 140419
Offset: 1
Examples
a(1) = 1049 is prime containing all the square digits (0, 1, 4, 9) and no others. a(2) = 1409 is prime containing all the square digits (0, 1, 4, 9) and no others.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[p:p in PrimesUpTo(150000)|Set(Intseq(p)) eq {0,1,4,9}]; // Marius A. Burtea, Jan 14 2020
-
Maple
f:= proc(n) local L,x; L:= convert(n,base,4); if convert(L,set) <> {0,1,2,3} then return NULL fi; L:= subs(2=4,3=9,L); x:= add(L[i]*10^(i-1),i=1..nops(L)); if isprime(x) then x else NULL fi end proc: map(f, [$4^3..4^6]); # Robert Israel, Jan 16 2020
-
Mathematica
Select[FromDigits /@ Tuples[{0, 1, 4, 9}, 6], PrimeQ[#] && Union[IntegerDigits[#]] == {0, 1, 4, 9} &]
Comments