OFFSET
1,1
COMMENTS
No other terms below 10^11.
LINKS
Jean-Marc Rebert, a375936
EXAMPLE
7 = 21_3 and 21 / 7 = 3
2753 = 11012_7 and 11012 / 2753 = 4
In each example the base is < 10. See a375936.txt in section Links for more examples.
MATHEMATICA
q[p_] := AnyTrue[Range[2, 9], Divisible[FromDigits[IntegerDigits[p, #]], p] &]; Select[Prime[Range[260000]], q] (* Amiram Eldar, Sep 03 2024 *)
PROG
(Python)
from gmpy2 import digits, is_prime, mpz
def ok(n): return is_prime(n) and any(mpz(digits(n, b))%n == 0 for b in range(2, 10))
print([k for k in range(10**7) if ok(k)]) # Michael S. Branicky, Sep 03 2024
(PARI) isok(k) = if (isprime(k), for (b=2, 9, if (!(fromdigits(digits(k, b)) % k), return(b)))); \\ Michel Marcus, Sep 04 2024
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Jean-Marc Rebert, Sep 03 2024
STATUS
approved