login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A258372 Smallest nonnegative number k not starting or ending with the digit 1 that forms a prime when it is sandwiched between n ones to the left of k and n ones to the right of k. 3
0, 3, 4, 8, 36, 8, 5, 72, 28, 6, 79, 212, 23, 6, 73, 24, 52, 62, 3, 28, 220, 53, 75, 58, 228, 9, 265, 89, 214, 86, 215, 4, 7, 39, 295, 40, 87, 216, 97, 6, 264, 53, 287, 223, 4, 239, 259, 25, 57, 364, 49, 38, 93, 86, 27, 30, 80, 24, 6, 356, 50, 645, 395, 206 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

n = 1 is the only case where a(n) = 0, since for any n > 1, A138148(n) is divisible by A002275(n).

No n exists such that a(n) = 2, since any number of the form A100706(n)+A011557(n) is of the form A000533(n)*A002275(n+1) (see comment by Robert Israel in A107123).

a(n) = 3 iff n is in A107123.

a(n) = 4 iff n is in A107124.

If k has an even number of digits and is a multiple of 11, then k is not a term. If k = (10^r+1)(10^m-1)/9 for some m > 0, r >= 0, then k is not a term. If A272232(k) = 0, then k is not a term. - Chai Wah Wu, Nov 08 2019

LINKS

Giovanni Resta, Table of n, a(n) for n = 1..1000

EXAMPLE

a(1) = 0, because 101 is prime.

a(5) = 36, because the smallest x >= 0 such that 11111_x_11111 (where '_' denotes concatenation) is prime is 36. The decimal expansion of that prime is 111113611111.

MATHEMATICA

Table[k = 0; s = Table[1, {n}]; While[Or[!PrimeQ[FromDigits[s ~Join~ IntegerDigits[k] ~Join~ s]], Or[First@ IntegerDigits@ k == 1, Last@ IntegerDigits@ k == 1]], k++]; k, {n, 64}] (* Michael De Vlieger, May 28 2015 *)

PROG

(PARI) a000042(n) = (10^n-1)/9

a(n) = my(k=0); while(k==10 || k%10==1 || k\(10^(#Str(k)-1))==1 || !ispseudoprime(eval(Str(a000042(n), k, a000042(n)))), k++); k

CROSSREFS

Cf. A088281, A090287, A272232.

Sequence in context: A155701 A119529 A180629 * A096847 A011993 A286125

Adjacent sequences:  A258369 A258370 A258371 * A258373 A258374 A258375

KEYWORD

nonn,base

AUTHOR

Felix Fröhlich, May 28 2015

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 9 00:09 EDT 2021. Contains 343685 sequences. (Running on oeis4.)