OFFSET
1,1
COMMENTS
a(n) = 2 iff prime(n) is not in A235266.
Conjecture: every integer > 1 eventually appears.
FORMULA
a(n) = max{ k : Sum_{j=0..D} b^j * d_j is a prime for b = 2..k } where the digits of the binary representation of n are d_D, d_{D-1}, ..., d_1, d_0.
EXAMPLE
a(1) = 3 because prime(1) = 2 = 10_2, and both 10_2 = 2 and 10_3 = 3 are primes, but 10_4 = 4 = 2*2.
a(36) = 5 because prime(36) = 151 = 10010111_2, and
10010111_2 = 151 is a prime
10010111_3 = 2281 is a prime,
10010111_4 = 16661 is a prime, and
10010111_5 = 78781 is a prime, but
10010111_6 = 281275 = 5^2 * 11251.
PROG
(PARI) a(n) = my(v=binary(prime(n)), b=2); while (isprime(fromdigits(v, b)), b++); b-1; \\ Michel Marcus, Jul 02 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Jon E. Schoenfield, Jun 29 2024
STATUS
approved