OFFSET
1,1
COMMENTS
a(n) = 0 if and only if prime(n) contains all decimal digits with the possible exception of 0. Otherwise, if n > 3 and p=prime(n) does not contain the nonzero digit k, the repdigit (10^m-1)*k/9 is a multiple of p where m is the order of 10 mod p. - Robert Israel, Jul 21 2020
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A074157(prime(n)). - Robert Israel, Jul 21 2020
MAPLE
f:= proc(n) local p, k, r, D;
D:= convert(convert(n, base, 10), set);
for k from 2 to 10^(1+ilog10(n)) do
r:= k*n;
if convert(convert(r, base, 10), set) intersect D = {} then return r fi
od;
error ("search failed for n=%1", n)
end proc:
seq(f(ithprime(i)), i=1..100); # Robert Israel, Jul 21 2020
MATHEMATICA
smp[p_]:=Module[{k=2}, While[ContainsAny[IntegerDigits[k*p], IntegerDigits[ p]], k++]; k*p]; Table[smp[p], {p, Prime[Range[60]]}] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 19 2019 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Oct 17 2002
EXTENSIONS
Corrected and extended by Ray Chandler, Feb 11 2005
STATUS
approved