A338366 a(n) = smallest positive number k with all digits equal such that the concatenation k||n||k is prime, or -1 if no such k exists.
1, 3, 7, 1, 11, 1, 7777, 3, 1, 1, 9, -1, 7, 33, 99, 1, 3, 1, 1, 9, 1, 11, -1, 1, 7, 3, 7777777777, 1111, 111, 1, 1, 3, 1, -1, 3, 33, 1, 3, 1, 77777777777777, 111, 3, 1111111111111111111111111111111111111111, 3, -1, 1, 3, 1, 1, 999, 7, 1, 11, 1, 7, -1, 33, 1, 3, 3, 1, 3, 1
Offset: 0
Examples
a(3) = 1 because 131 is prime. a(4) = 11 because 11411 is prime, and all of 141, 242, 343, ..., 949 are composite.
Links
Crossrefs
Extensions
More terms from Alois P. Heinz, Nov 08 2020
Comments