login
Exactly four distinct primes occur as substrings of the digits of n.
1

%I #10 Mar 23 2019 02:58:10

%S 113,131,179,197,223,231,233,235,239,253,257,271,273,283,293,297,311,

%T 313,337,347,353,359,367,371,372,375,397,431,437,473,479,531,532,547,

%U 571,573,593,597,613,617,653,713,719,723,731,732,733,735,737,739,743

%N Exactly four distinct primes occur as substrings of the digits of n.

%C n, 10*n, 10*n+4, 10*n+6 and 10*n+8 are all in the sequence if any one of them is. - _Robert Israel_, Mar 21 2019

%H Robert Israel, <a href="/A163760/b163760.txt">Table of n, a(n) for n = 1..10000</a>

%e a(1) = 113 because "3" and "11" and "13" and "113" are prime substrings of "113".

%p filter:= proc(n) local L, m, SS, S,count,i,j;

%p L:= convert(n,base,10);

%p m:= nops(L);

%p SS:= remove(t -> t[-1]=0, {seq(seq(L[i..j],j=i..m),i=1..m)});

%p nops(select(isprime, map(S -> add(S[i]*10^(i-1),i=1..nops(S)), SS))) = 4

%p end proc:

%p select(filter, [$100..1000]); # _Robert Israel_, Mar 21 2019

%Y Cf. A163754, A163759.

%K base,easy,nonn

%O 1,1

%A _Gil Broussard_, Aug 03 2009