login
A388300
a(n) is the base-A388299(n) representation of n.
2
2, 11, 11, 101, 11, 13, 13, 13, 101, 23, 13, 31, 13, 23, 31, 101, 17, 103, 19, 41, 211, 10111, 19, 41, 101, 43, 103, 131, 19, 43, 19, 113, 1021, 43, 19, 211, 53, 103, 37, 131, 19, 223, 19, 113, 1201, 101111, 53, 61, 101, 47, 103, 311, 19, 313, 211, 71, 2011, 113, 19, 331, 19, 223, 71, 101, 73
OFFSET
2,1
COMMENTS
a(n) is the base-b representation of n for the smallest base b>=2 such that this base-b representation is the base-10 representation of a prime.
LINKS
EXAMPLE
a(5) = 101 because 5 = 101_2 and 101 is prime.
MAPLE
f:= proc(n) local b, L, i, p;
for b from 2 do
L:= convert(n, base, b);
if max(L) > 9 then next fi;
p:= add(L[i]*10^(i-1), i=1..nops(L));
if isprime(p) then return p fi
od
end proc:
map(f, [$2..100]);
MATHEMATICA
a[n_]:=Module[{b=2}, While[!ContainsOnly[IntegerDigits[n, b], Range[0, 9]]||!PrimeQ[FromDigits[IntegerDigits[n, b]]], b++]; FromDigits[IntegerDigits[n, b]]]; Array[a, 65, 2] (* James C. McMahon, Sep 25 2025 *)
CROSSREFS
Cf. A388299.
Sequence in context: A290394 A292779 A245521 * A275617 A090009 A153706
KEYWORD
nonn,base,look
AUTHOR
Robert Israel, Sep 16 2025
STATUS
approved