login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A330600 Primes p such that the sum of (p mod d) for nonzero digits d of p is prime. 1
17, 23, 29, 37, 53, 67, 83, 97, 107, 113, 127, 131, 139, 157, 163, 167, 173, 181, 191, 193, 199, 223, 227, 233, 241, 251, 281, 283, 307, 311, 313, 331, 337, 353, 367, 379, 383, 397, 409, 421, 431, 433, 439, 457, 463, 467, 499, 503, 521, 523, 541, 569, 571, 587, 593, 613, 631, 643, 647, 659, 661 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
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
Sequence in context: A068581 A166864 A137670 * A217044 A145484 A080830
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, Dec 19 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 14:46 EDT 2024. Contains 371749 sequences. (Running on oeis4.)