login
A242987
Numbers n such that concatenating 1 with two instances of n produces a prime.
4
9, 17, 23, 47, 59, 63, 81, 87, 107, 117, 131, 137, 143, 153, 167, 173, 179, 189, 191, 197, 201, 209, 213, 221, 231, 239, 261, 263, 281, 297, 299, 311, 317, 323, 339, 369, 377, 381, 399, 401, 411, 413, 417, 453, 473, 477, 479, 491, 501, 503, 509, 519, 533
OFFSET
1,1
COMMENTS
The order is important. 3 does not qualify, because 133 is not a prime, even though 313 is. - N. J. A. Sloane, Aug 19 2014
LINKS
EXAMPLE
81 is included because 18181 is a prime. 137 is included because 1137137 is a prime.
MATHEMATICA
Select[Range[999], PrimeQ[FromDigits[Join[{1}, IntegerDigits[ #], IntegerDigits[ #]]]]&]
PROG
(Python)
from sympy import isprime
for n in range(1, 10**3):
if isprime(int('1'+str(n)+str(n))):
print(n, end=', ')
# Derek Orr, Aug 17 2014
(PARI) s=[]; for(n=1, 10^3, d=length(Str(n)); if(isprime(10^(2*d)+(10^(2*d)-1)/(10^d-1)*n), s=concat(s, n))); s \\ Jens Kruse Andersen, Aug 18 2014
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Harvey P. Dale, Aug 17 2014
STATUS
approved