OFFSET
1,1
COMMENTS
Subsequence of A061246.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
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.
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} &]
PROG
(Magma) [p:p in PrimesUpTo(150000)|Set(Intseq(p)) eq {0, 1, 4, 9}]; // Marius A. Burtea, Jan 14 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Jan 14 2020
STATUS
approved