OFFSET
2,1
COMMENTS
If n is prime then a(n) = n, otherwise a(n) > n^2.
Such a prime always exists.
LINKS
Paolo Xausa, Table of n, a(n) for n = 2..10000
MATHEMATICA
A390983[n_] := If[PrimeQ[n], n, NestWhile[NextPrime, NextPrime[n^2], FreeQ[IntegerDigits[#, n], 0] &]];
Array[A390983, 60, 2] (* Paolo Xausa, Dec 01 2025 *)
PROG
(PARI) a(n) = my(p=2); while (vecmin(digits(p, n)), p = nextprime(p+1)); p; \\ Michel Marcus, Nov 25 2025
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Nicolas Bělohoubek, Nov 25 2025
STATUS
approved
