login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A232766
Numbers n such that the concatenation n987654321 is prime.
2
28, 32, 44, 50, 55, 58, 97, 100, 107, 112, 130, 149, 152, 154, 179, 193, 208, 233, 259, 265, 271, 287, 310, 314, 320, 326, 341, 359, 365, 376, 404, 413, 421, 439, 449, 455, 457, 466, 469, 491, 499, 536, 538, 545, 547, 548, 557, 565, 568, 574, 593, 614, 616
OFFSET
1,1
EXAMPLE
314 is a member of this sequence because 314987654321 is prime.
PROG
(Python)
from sympy import isprime
{print(n, end=', ') for n in range(2000) if isprime(int(str(n)+"987654321"))}
# Simplified by Derek Orr, Apr 10 2015
(PARI) for(n=1, 2000, if(isprime(eval(concat(Str(n), "987654321"))), print1(n, ", "))) \\ Derek Orr, Apr 10 2015
(Magma) [n: n in [0..1000] | IsPrime(Seqint(Intseq(987654321) cat Intseq(n)))]; // 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