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!)
A186142 a(n) is the smallest suffix such that the numbers with k digits "9" prepended are primes for k = 1, 2, ..., n. 3
7, 7, 29, 907, 32207, 573217, 3136717, 4128253, 2181953771, 2181953771, 2181953771 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
See A186143 for the digit "3" case. The corresponding sequences with the digits "1" or "7" are not possible because if Xn and XXn are prime, then XXXn will be a multiple of 3 when X is 1 or 7.
By construction, a(n+1) >= a(n). - Michael S. Branicky, Jul 07 2021
From Bernard Schott, Dec 20 2021: (Start)
If the restriction "but not for k = n+1" is added, the terms become 11, 7, 29, 907, 32207, 573217, 3136717, ... In this case, the 1st term becomes 11 because 911 is prime while 9911 is divisible by 11.
In complement of 1st comment, the corresponding sequences with the digits "2", "4", "5" or "8" are not also possible for the same reasons. See A350216 for the digit "6" case. (End)
LINKS
EXAMPLE
a(3) = 29 because 929, 9929, 99929 are primes.
MATHEMATICA
m=1; Table[While[d=IntegerDigits[m]; k=0; While[k++; PrependTo[d, 9]; k <= n && PrimeQ[FromDigits[d]]]; k <= n, m++]; m, {n, 6}]
PROG
(Python)
from sympy import isprime
def a(n, startfrom=1):
an = startfrom + (1 - startfrom%2)
while not all(isprime(int("9"*k+str(an))) for k in range(1, n+1)): an+=2
return an
def afind(nn):
an = 1
for n in range(1, nn+1): an = a(n, startfrom=an); print(an, end=", ")
afind(8) # Michael S. Branicky, Jul 07 2021
CROSSREFS
Sequence in context: A299338 A341246 A246039 * A188274 A255281 A255283
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Feb 13 2011
EXTENSIONS
a(9)-a(11) from Michael S. Branicky, Jul 07 2021
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 April 25 13:34 EDT 2024. Contains 371971 sequences. (Running on oeis4.)