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”).

A331346
Primes using all the square digits {0, 1, 4, 9} and no others.
1
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,1
COMMENTS
Subsequence of A061246.
LINKS
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