|
|
A242990
|
|
Numbers n such that concatenating 1 with five instances of n produces a prime.
|
|
4
|
|
|
9, 21, 41, 101, 143, 171, 249, 251, 297, 329, 333, 347, 357, 489, 509, 531, 537, 557, 569, 611, 629, 653, 657, 669, 731, 773, 821, 843, 861, 941, 957, 983, 993, 1133, 1143, 1209, 1229, 1239, 1313, 1361, 1409, 1427, 1451, 1497, 1539, 1647, 1673, 1791, 1833
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
Jens Kruse Andersen, Table of n, a(n) for n = 1..10000
|
|
EXAMPLE
|
143 is included because 1143143143143143 is a prime.
|
|
MATHEMATICA
|
cQ[n_, i_]:=Module[{idn=IntegerDigits[n]}, PrimeQ[FromDigits[Flatten[Join[ {1}, Table[ idn, {i}]]]]]]; Select[Range[2000], cQ[#, 5]&]
|
|
PROG
|
(Python)
from sympy import isprime
for n in range(2*10**3):
..if isprime(int('1'+5*str(n))):
....print(n, end=', ')
# Derek Orr, Aug 17 2014
(PARI) s=[]; for(n=1, 10^4, d=length(Str(n)); if(isprime(10^(5*d)+(10^(5*d)-1)/(10^d-1)*n), s=concat(s, n))); s \\ Jens Kruse Andersen, Aug 18 2014
|
|
CROSSREFS
|
Cf. A242987, A242988, A242989.
Sequence in context: A107890 A110209 A184040 * A053476 A110680 A163205
Adjacent sequences: A242987 A242988 A242989 * A242991 A242992 A242993
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
Harvey P. Dale, Aug 17 2014
|
|
STATUS
|
approved
|
|
|
|