login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A228148 a(n) is the smallest n-digit prime which remains prime whenever a 1 is inserted, appended or prepended, or 0 if no such prime exists. 3
3, 13, 103, 1117, 11119, 114031, 1114693, 11213611, 101116111, 1013251111, 10116171733, 101346411811, 1011670114111, 11111117116117 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Smallest n-digit term of A069246.
LINKS
EXAMPLE
a(3) = 103 is the smallest 3-digit prime which yields 4 primes by inserting a 1 in every possible position: 1103, 1103, 1013, 1031.
MATHEMATICA
pp[n_, k_] := Catch[Block[{d = IntegerDigits@n}, Do[If[! PrimeQ[ FromDigits[ Insert[d, k, i]]], Throw[False]], {i, 1+Length@d}]; True]]; a[n_] := Catch[ Block[{p = NextPrime[10^(n-1)]}, While[p < 10^n, If[pp[p, 1], Throw@p, p = NextPrime@p]]; 0]]; a /@ Range[7]
CROSSREFS
Sequence in context: A127004 A068168 A215126 * A098027 A357247 A182104
KEYWORD
nonn,base,more
AUTHOR
Giovanni Resta, Aug 13 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 17 07:15 EDT 2024. Contains 375200 sequences. (Running on oeis4.)