|
|
A168167
|
|
Numbers with d digits (d>0) which have at least 2d distinct primes as substrings.
|
|
2
|
|
|
1373, 3137, 3797, 5237, 6173, 11317, 11373, 13733, 13739, 13797, 17331, 19739, 19973, 21137, 21317, 21373, 21379, 22397, 22937, 23117, 23137, 23173, 23371, 23373, 23719, 23797, 23971, 24373, 26173, 26317, 27193, 27197, 29173, 29537
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
"Substrings" includes the whole number in itself.
The terms up to 11317 are primes themselves. The subsequence A168169 lists primes which have more than 2d prime substrings.
Palindromes in the sequence include 1337331, 1375731, and 1793971.
Even numbers in the sequence include 313732, 313792 and 1131712. (End)
|
|
LINKS
|
|
|
EXAMPLE
|
The least number with d digits to have 2d distinct prime substrings is a(1)=1373, with 4 digits and #{3, 7, 13, 37, 73, 137, 373, 1373} = 8.
|
|
MAPLE
|
filter:= proc(n) local i, j, count, d, S, x, y;
d:= ilog10(n)+1;
count:= 0; S:= {};
for i from 0 to d-1 do
x:= floor(n/10^i);
for j from i to d-1 do
y:= x mod 10^(j-i+1);
if not member(y, S) and isprime(y) then count:= count+1; S:= S union {y}; if count = 2*d then return true fi fi
od od;
false
end proc:
|
|
PROG
|
(PARI) {for( p=1, 1e6, #prime_substrings(p) >= #Str(p)*2 & print1(p", "))} /* see A168168 for prime_substrings() */
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|