login
A232727
Numbers n such that the concatenation n123456789 is prime.
1
28, 32, 41, 55, 56, 59, 74, 95, 100, 116, 119, 122, 124, 142, 154, 161, 164, 179, 184, 193, 200, 215, 217, 220, 230, 241, 259, 265, 278, 296, 298, 314, 332, 382, 392, 406, 409, 416, 424, 425, 439, 452, 455, 458, 460, 466, 475, 493, 496, 514, 515, 530, 536, 559, 572, 574, 598, 602, 613, 629, 634
OFFSET
1,1
COMMENTS
Numbers n in the primes of the form n987654321 are listed in A232766. Primes in sequence are in A232728.
EXAMPLE
278 is a member of this sequence because 278123456789 is prime.
MATHEMATICA
Select[Range[700], PrimeQ[FromDigits[Flatten[{IntegerDigits[#], IntegerDigits[123456789]}]]] &] (* Vincenzo Librandi, Apr 28 2015 *)
PROG
(Python)
from sympy import isprime
{print(n, end=', ') for n in range(1, 10**3) if isprime(int(str(n)+'123456789'))}
## Simplified by Derek Orr, Apr 28 2015
(PARI) for(n=1, 10^3, if(isprime(eval(concat(Str(n), "123456789"))), print1(n, ", "))) \\ Derek Orr, Apr 28 2015
(Magma) [n: n in [0..700] | IsPrime(Seqint([9..1 by -1] cat Intseq(n)))]; // Vincenzo Librandi, Apr 28 2015
(Sage) [n for n in (1..700) if is_prime(n*10^9+123456789)] # Bruno Berselli, Apr 28 2015
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Derek Orr, Nov 29 2013
EXTENSIONS
More terms from Derek Orr, Apr 28 2015
STATUS
approved