OFFSET
4,1
COMMENTS
Given a number M, delete its last digit d, then add d*a(n). If the result is divisible by prime(n), then M is also divisible by prime(n). This process may be repeated.
a(n) can be quickly calculated by finding the smallest multiple of prime(n) ending in 9, adding one, and dividing that result by 10. E.g., 7 -> 49 -> 5, 11 -> 99 -> 10, 13 -> 39 -> 4, 17 -> 119 -> 12, 19 -> 19 -> 2.
FORMULA
a(n) = prime(n) - A103876(n).
a(n) = (A114013(n) + 1)/10. - Hugo Pfoertner, Jan 28 2023
PROG
(Python)
import sympy
[pow(10, -1, p) for p in sympy.primerange(7, 348)]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Nicholas Stefan Georgescu, Jan 18 2023
STATUS
approved