cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A373859 Smallest prime obtained by appending one or more 9's to n, -1 if no such prime exists.

Original entry on oeis.org

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
Offset: 1

Views

Author

Toshitaka Suzuki, Jun 19 2024

Keywords

Crossrefs

Programs

  • 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

Formula

a(11) = 1199999 because 119, 1199, 11999 and 119999 are not primes.
Showing 1-1 of 1 results.