A373201 a(n) = smallest number m > 0 such that n followed by m 9's yields a prime, or -1 if no such m exists.
1, 1, -1, 2, 1, -1, 1, 1, -1, 1, 5, -1, 1, 1, -1, 2, 1, -1, 1, 2, -1, 1, 1, -1, 3, 1, -1, 4, 2, -1, 28, 2, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 16, 1, -1, 1, 1, -1, 3, 2, -1, 5, 1, -1, 15, 1, -1, 1, 2, -1, 12, 1, -1, 4, 2, -1, 1, 1, -1, 1, 2, -1, 1, 3
Offset: 1
Examples
a(25)=3 because 259 and 2599 are composite but 25999 is prime.
Links
- Toshitaka Suzuki, Table of n, a(n) for n = 1..4419
Comments