OFFSET
1,1
COMMENTS
"Substrings" includes the whole number in itself.
This is a subsequence of A168167.
The least palindrome in this sequence is 9179719.
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
EXAMPLE
The least number with d digits to have over 2d distinct prime substrings is the prime a(1)=23719, with 5 digits and #{2, 3, 7, 19, 23, 37, 71, 719, 2371, 3719, 23719} = 11.
MAPLE
filter:= proc(n) local i, j, count, d, S, x, y;
if not isprime(n) then return false fi;
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:
select(filter, [seq(i, i=1..10^6, 2)]); # Robert Israel, Nov 11 2020
PROG
(PARI) {forprime( p=1, default(primelimit), #prime_substrings(p) > #Str(p)*2 & print1(p", "))} /* see A168168 for prime_substrings() */
CROSSREFS
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Nov 28 2009
STATUS
approved