[go: up one dir, main page]

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”).

A162423
Primes whose decimal expansion has the form XYYYX, for nonzero numbers X and Y, where Y is a single digit.
7
13331, 15551, 16661, 19991, 72227, 75557, 76667, 78887, 79997, 1177711, 1333313, 1355513, 1377713, 1399913, 1711117, 1755517, 1766617, 1777717, 1966619, 1977719, 2311123, 2333323, 2922229, 2944429, 2955529, 2977729, 3111131
OFFSET
1,1
COMMENTS
There can be no prime whose middle three digits are "000" because it would equal X*(10^Floor[Log[10,X]+1] + 1). - Robert G. Wilson v, Jul 11 2009
LINKS
MATHEMATICA
f[n_] := Block[{len = Floor[ Log[10, n] + 1]}, Select[10^(3 + len) n + 10^len*Table[k (10^3 - 1)/9, {k, 9}] + n, PrimeQ@# &]]; Array[f, 31] // Flatten (* Robert G. Wilson v, Jul 11 2009 *)
Select[FromDigits/@Flatten[Table[Join[IntegerDigits[x], PadRight[{}, 3, y], IntegerDigits[ x]], {x, 40}, {y, Range[9]}], 1], PrimeQ] (* Harvey P. Dale, Jun 28 2020 *)
PROG
(Magma) m:=3; [p: d in [1..9], n in [1..40 by 2] | IsPrime(p) where p is n*(10^(m+t)+1)+d*10^t*(10^m-1) div 9 where t is #Intseq(n)]; // Vincenzo Librandi, Sep 14 2013
CROSSREFS
Sequence in context: A034625 A283155 A254851 * A176465 A185503 A333014
KEYWORD
nonn,base
AUTHOR
Vincenzo Librandi, Jul 03 2009
STATUS
approved