OFFSET
1,2
COMMENTS
The sequence can be extended to bases larger than 10 by concatenating the decimal equivalents of digits.
a(1) is -1 since no such primes are possible (the sequence in question is A362118). Proof. The number of ones in the resulting repunit is triangular and per A000217, 3 is the only prime triangular number, and per A004023, prime repunits must have prime indices.
If it exists, a(10) would be the index of the first prime in A007908. See A007908 for the latest information about the search for this prime.
a(10), ..., a(14) are respectively ?, 144, 307, ?, 25.
a(10) and a(13) are presently unknown. a(13) > 10000 if it is not -1.
EXAMPLE
a(5) is 6: 12341011 (concatenate 1 though 6 in base 5) is a prime when interpreted as a decimal number.
PROG
(Python)
from gmpy2 import is_prime
from sympy.ntheory import digits
from itertools import count, islice
def c(base, s=""):
if base == 1: yield from (s:=s+"1"*n for n in count(1))
else:
yield from (s:=s+"".join(map(str, digits(n, base)[1:])) for n in count(1))
def a(n):
if n == 1: return -1
return next(k for k, t in enumerate(c(n), 1) if is_prime(int(t)))
CROSSREFS
KEYWORD
sign,base,more
AUTHOR
Michael S. Branicky and N. J. A. Sloane, Apr 19 2023
STATUS
approved