OFFSET
0,3
COMMENTS
a(p) > 0 for any prime p because p is the only digit in base b = p + 1.
Conjecture: Exactly the values k = 0, 1, 4, 6, 9 satisfy a(k) = 0.
EXAMPLE
a(11) = 4 because 11 is (2)(3) in base 4 where 2 and 3 are primes and there is no smaller base with that property.
a(74) = 19 because 74 is (3)(17) in base 19 where 3 and 17 are primes and there is no smaller base with that property.
MAPLE
MATHEMATICA
a[n_]:=Module[{b=2}, If[MemberQ[{0, 1, 4, 6, 9}, n], 0, b=2; While[!AllTrue[IntegerDigits[n, b], PrimeQ], b++]; b]]; Array[a, 80, 0] (* James C. McMahon, Oct 31 2025 *)
PROG
(PARI) a(n) = for(b=2, n+1, my(d=digits(n, b)); if (#select(isprime, d) == #d, return(b))); \\ Michel Marcus, Oct 29 2025
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Felix Huber, Oct 29 2025
STATUS
approved
