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!)
A366826 Composite numbers whose proper substrings (of their decimal expansions) are all primes. 0
4, 6, 8, 9, 22, 25, 27, 32, 33, 35, 52, 55, 57, 72, 75, 77, 237, 537, 737 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
There are no terms greater than 999 because the only three-digit prime whose substrings are all primes is 373 (see A085823) and prepending or appending any prime digit to it would create a different three-digit substring.
LINKS
EXAMPLE
237 is included because it is composite and 2, 3, 7, 23 and 37 are all primes.
4 is included because it is composite and has no proper substrings.
PROG
(Python)
from itertools import combinations
from sympy import isprime
for n in range(2, 1000):
if not isprime(n):
properSubstrings = set(
int(str(n)[start:end]) for (start, end)
in combinations(range(len(str(n)) + 1), 2)
) - set((n, ))
if all(isprime(s) for s in properSubstrings):
print(n, end=', ')
CROSSREFS
Subsequence of A002808.
Cf. A000040.
Sequence in context: A121719 A267509 A162738 * A161600 A032350 A078337
KEYWORD
base,fini,full,nonn
AUTHOR
Kalle Siukola, Oct 25 2023
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 May 7 17:41 EDT 2024. Contains 372312 sequences. (Running on oeis4.)