Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
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!)
A373859 Smallest prime obtained by appending one or more 9's to n, -1 if no such prime exists. 1
19, 29, -1, 499, 59, -1, 79, 89, -1, 109, 1199999, -1, 139, 149, -1, 1699, 179, -1, 199, 2099, -1, 229, 239, -1, 25999, 269, -1, 289999, 2999, -1, 319999999999999999999999999999, 3299, -1, 349, 359, -1, 379, 389, -1, 409, 419, -1, 439, 449, -1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
a(11) = 1199999 because 119, 1199, 11999 and 119999 are not primes.
PROG
(Python)
from itertools import count
from sympy import isprime
def A373859(n): return next(p for p in ((n+1)*10**m-1 for m in count(1)) if isprime(p)) if n%3 else -1 # Chai Wah Wu, Jul 08 2024
CROSSREFS
Sequence in context: A095046 A166667 A121458 * A268488 A254330 A052260
KEYWORD
base,sign
AUTHOR
Toshitaka Suzuki, Jun 19 2024
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 September 12 14:14 EDT 2024. Contains 375851 sequences. (Running on oeis4.)