login
Primes p such that p divides the concatenation of the next two primes.
0

%I #20 May 08 2015 09:33:26

%S 3,7,61,167

%N Primes p such that p divides the concatenation of the next two primes.

%C No additional terms up to the 5-millionth prime. Is the sequence finite and complete?

%C No additional terms up to the billionth prime. - _Chai Wah Wu_, Mar 10 2015

%C a(5) > 10^18. If the reasonable assumption nextprime(p) < p + (log p)^2 holds, then a(5) > 10^53. However, the 192-digits prime

%C 7046979865771812080536912751677852348993288590604026845637583892...

%C 6174496644295302013422818791946308724832214765100671140939597315...

%C 4362416107382550335570469798657718120805369127516778523489932887 is in the sequence. - _Giovanni Resta_, May 08 2015

%e The three primes beginning with 61 are 61, 67, and 71, and 61 evenly divides 6771.

%t divQ[{a_,b_,c_}]:=Divisible[FromDigits[Flatten[IntegerDigits/@{b,c}]],a]; Transpose[Select[Partition[Prime[Range[500]],3,1],divQ]][[1]]

%o (Python)

%o from sympy import nextprime

%o A255669_list, p1, p2, l = [], 2, 3, 10

%o for n in range(10**8):

%o ....p3 = nextprime(p2)

%o ....if p3 >= l: # this test is sufficient by Bertrand-Chebyshev theorem

%o ........l *= 10

%o ....if not ((p2 % p1)*l + p3) % p1:

%o ........A255669_list.append(p1)

%o ....p1, p2 = p2, p3 # _Chai Wah Wu_, Mar 09 2015

%K nonn,base

%O 1,1

%A _Harvey P. Dale_, Mar 01 2015