OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
97 is a term since its sum of digits is 9+7 = 16, and 97 mod 16 = 1.
MAPLE
select(t -> isprime(t) and t mod convert(convert(t, base, 10), `+`) = 1, [seq(i, i=3..10000, 2)]); # Robert Israel, Mar 05 2024
MATHEMATICA
Select[Range[2000], PrimeQ[#] && Mod[#, Plus @@ IntegerDigits[#]] == 1 &] (* Amiram Eldar, Sep 10 2021 *)
PROG
(Python)
from sympy import primerange
def ok(p): return p%sum(map(int, str(p))) == 1
print(list(filter(ok, primerange(1, 2130)))) # Michael S. Branicky, Sep 10 2021
(PARI) isok(p) = isprime(p) && ((p % sumdigits(p)) == 1); \\ Michel Marcus, Sep 10 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Burak Muslu, Sep 10 2021
STATUS
approved