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-3 of 3 results.

A363922 a(n) = smallest number m > 0 such that n followed by m 7's yields a prime, or -1 if no such m exists.

Original entry on oeis.org

1, 2, 1, 1, 2, 1, -1, 2, 1, 1, 3, 1, 1, -1, 1, 1, 2, 2, 1, 6, -1, 1, 2, 2, 1, 2, 1, -1, 48, 1, 1, 5, 1, 1, -1, 1, 10, 2, 1, 12, 2, -1, 3, 3, 1, 1, 3, 1, -1, 2, 8, 7, 3, 1, 1, -1, 1, 1, 9, 1, 1, 2, -1, 1, 2, 5, 1, 3, 2, -1, 2, 1, 66, 2, 1, 3, -1, 1, 1, 3
Offset: 1

Views

Author

Toshitaka Suzuki, Jul 12 2023

Keywords

Comments

a(n) = -1 when n = 7*k because no matter how many 7's are appended to n, the resulting number is always divisible by 7 and therefore cannot be prime.
a(n) = -1 when n = 15873*k + 891, 1261, 2889, 3263, 3300, 7810, 8917, 9812, 12617, 13024, 14615 or 15066, because n followed by any positive number, m say, of 7's is divisible by at least one of the primes {3,11,13,37}.
Similarly,
a(n) = -1 when n = 11111111*k + 964146, 1207525, 2342974, 3567630, 7525789, 8134540, 8591231 or 9641467 by primes {11,73,101,137};
a(n) = -1 when n = 429000429*k + 23928593, 27079312, 36492115, 41207969, 52285750, 80569929, 89920882, 93857078, 133928703, 217208145, 223492302, 236849444, 239285937, 247857232, 259793116, 270793127, 323985244, 332698824, 333570182, 334985255, 346849554, 364921157, 376698868 or 412079697 by primes {3,11,13,101,9901};
a(n) = -1 when n = 1221001221*k + 14569863, 28792885, 145698637, 167698659, 225079510, 235985156, 247079532, 287928857, 331921124, 399492478, 415286113, 421492500, 437286135, 455985376, 489857474, 529929099, 551921344, 635208563, 709857694, 877208805, 896850104, 993570842, 1029793886 or 1138850346 by primes {3,11,37,101,9901};
a(n) = -1 when n = 1443001443*k + 85928655, 167698659, 176928746, 218921011, 233985154, 247079532, 310492389, 326286024, 376857361, 585793442, 655208583, 700699192, 746208674, 780080065, 791570640, 805850013, 843492922, 859286557, 882570731, 896850104, 1027793884, 1219922012, 1234986155 or 1377858362 by primes {3,13,37,101,9901}.
a(4444) > 300000 or a(4444) = -1.

Examples

			a(11)=3 because 117 and 1177 are composite but 11777 is prime.
		

Crossrefs

Programs

  • PARI
    a(n) = if ((n%7), my(m=1); while (!isprime(eval(concat(Str(n), Str(7*(10^m-1)/9)))), m++); m, -1); \\ Michel Marcus, Jul 17 2023

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

Original entry on oeis.org

13, 23, -1, 43, 53, -1, 73, 83, -1, 103, 113, -1, 1333333333333333, 1433, -1, 163, 173, -1, 193, 20333, -1, 223, 233, -1, 2533333333, 263, -1, 283, 293, -1, 313, 323333, -1, 3433, 353, -1, 373, 383, -1
Offset: 1

Views

Author

Toshitaka Suzuki, Mar 30 2024

Keywords

Comments

Next term is 40 followed by 483 3's and is too large to display here (see the b-file).

Examples

			For n = 13, a(13) = 1333333333333333 is a prime (but 133,1333,13333 etc. are not primes).
		

Crossrefs

See A112394 for another version.

Extensions

Edited by N. J. A. Sloane, Apr 24 2024

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-3 of 3 results.