OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(10) = 113 is in the sequence because 113 is prime and (113 mod 1) + (113 mod 1) + (113 mod 3) = 2 is prime.
MAPLE
filter:= proc(n) local t;
isprime(n) and isprime(add(n mod t, t = subs(0=NULL, convert(n, base, 10))))
end proc:
select(filter, [seq(i, i=3..1000, 2)]);
MATHEMATICA
smdQ[n_]:=PrimeQ[Total[Mod[n, Select[IntegerDigits[n], #!=0&]]]]; Select[ Prime[ Range[150]], smdQ] (* Harvey P. Dale, Jun 20 2021 *)
PROG
(Magma) a:=[]; for p in PrimesUpTo(700) do v:=[]; for i in [1..#Intseq(p)] do if Intseq(p)[i] ne 0 then Append(~v, Intseq(p)[i]); end if; end for; if IsPrime(&+[p mod v[u]: u in [1..#v]]) then Append(~a, p); end if; end for; a; // Marius A. Burtea, Dec 19 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, Dec 19 2019
STATUS
approved