login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A347702
Prime numbers that give a remainder of 1 when divided by the sum of their digits.
3
11, 13, 17, 41, 43, 97, 101, 131, 157, 181, 233, 239, 271, 311, 353, 401, 421, 491, 521, 541, 599, 617, 631, 647, 673, 743, 811, 859, 953, 1021, 1031, 1051, 1093, 1171, 1201, 1249, 1259, 1301, 1303, 1327, 1373, 1531, 1601, 1621, 1801, 1871, 2029, 2111, 2129, 2161
OFFSET
1,1
LINKS
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
Subsequence of A209871.
A259866 \ {31}, and the primes associated with A056804 \ {1, 2} and A056797 are subsequences.
Sequence in context: A375091 A032502 A209871 * A167794 A019336 A104070
KEYWORD
nonn,base
AUTHOR
Burak Muslu, Sep 10 2021
STATUS
approved