A255669 Primes p such that p divides the concatenation of the next two primes.
3, 7, 61, 167
Offset: 1
Examples
The three primes beginning with 61 are 61, 67, and 71, and 61 evenly divides 6771.
Programs
-
Mathematica
divQ[{a_,b_,c_}]:=Divisible[FromDigits[Flatten[IntegerDigits/@{b,c}]],a]; Transpose[Select[Partition[Prime[Range[500]],3,1],divQ]][[1]]
-
Python
from sympy import nextprime A255669_list, p1, p2, l = [], 2, 3, 10 for n in range(10**8): p3 = nextprime(p2) if p3 >= l: # this test is sufficient by Bertrand-Chebyshev theorem l *= 10 if not ((p2 % p1)*l + p3) % p1: A255669_list.append(p1) p1, p2 = p2, p3 # Chai Wah Wu, Mar 09 2015
Comments