login
A232725
Numbers n such that the concatenation 123456789n is prime.
1
1, 23, 29, 49, 133, 143, 167, 191, 199, 217, 257, 311, 403, 409, 419, 433, 437, 451, 457, 473, 563, 587, 601, 623, 629, 653, 671, 689, 721, 761, 769, 779, 803, 809, 851, 871, 881, 893, 913, 943, 947, 959, 1003, 1013, 1027, 1069, 1079, 1091, 1153, 1163, 1177
OFFSET
1,2
EXAMPLE
721 is a member of this sequence because 123456789721 is prime.
PROG
(Python)
from sympy import isprime
{print(n, end=', ') for n in range(2000) if isprime(int("123456789"+str(n)))}
# Simplified by Derek Orr, Apr 10 2015
(PARI) for(n=1, 2000, if(isprime(eval(concat("123456789", Str(n)))), print1(n, ", "))) \\ Derek Orr, Apr 10 2015
(Magma) [n: n in [0..1500] | IsPrime(Seqint(Intseq(n) cat Intseq(123456789)))]; // Vincenzo Librandi, Apr 11 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Derek Orr, Nov 29 2013
EXTENSIONS
More terms from Derek Orr, Apr 10 2015
STATUS
approved