The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A355856 Primes, with at least one prime digit, that remain primes when all of their prime digits are removed. 1
113, 131, 139, 151, 179, 193, 197, 211, 241, 311, 389, 421, 431, 541, 613, 617, 631, 719, 761, 829, 839, 859, 1013, 1021, 1031, 1039, 1051, 1093, 1097, 1123, 1153, 1201, 1213, 1217, 1229, 1231, 1249, 1259, 1279, 1291, 1297, 1301, 1321, 1381, 1399, 1429, 1439, 1459, 1493, 1531, 1549 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Terms of A034844 that only have nonprime digits are not terms here. - Michel Marcus, Jul 19 2022
LINKS
EXAMPLE
The prime 179 is a term because when its prime digit 7 is removed, it remains 19, which is still a prime.
The prime 136457911 is a term because when all of its prime digits, 3, 5, and 7 are removed, it remains 164911, which is still a prime.
MATHEMATICA
q[n_] := (r = FromDigits[Select[IntegerDigits[n], ! PrimeQ[#] &]]) != n && PrimeQ[r]; Select[Prime[Range[250]], q] (* Amiram Eldar, Jul 19 2022 *)
PROG
(MATLAB)
function a = A355856( max_prime )
a = []; p = primes( max_prime );
for n = 1:length(p)
s = num2str(p(n));
s = strrep(s, '2', ''); s = strrep(s, '3', '');
s = strrep(s, '5', ''); s = strrep(s, '7', '');
m = str2double(s);
if m > 1
if isprime(m) && m ~= p(n)
a = [a p(n)];
end
end
end
end % Thomas Scheuerle, Jul 19 2022
(PARI) isok(p) = if (isprime(p), my(d=digits(p), v=select(x->(!isprime(x)), d)); (#v != #d) && isprime(fromdigits(v)); ) \\ Michel Marcus, Jul 19 2022
(Python)
from sympy import isprime
def ok(n):
s = str(n)
if n < 10 or set(s) & set("2357") == set(): return False
sd = s.translate({ord(c): None for c in "2357"})
return len(sd) and isprime(int(sd)) and isprime(n)
print([k for k in range(2000) if ok(k)]) # Michael S. Branicky, Jul 23 2022
CROSSREFS
Sequence in context: A214847 A069488 A131648 * A180441 A180407 A163760
KEYWORD
nonn,base
AUTHOR
Tamas Sandor Nagy, Jul 19 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 5 08:28 EDT 2024. Contains 373102 sequences. (Running on oeis4.)