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!)
A347702 Prime numbers that give a remainder of 1 when divided by the sum of their digits. 3

%I #26 Mar 05 2024 15:08:42

%S 11,13,17,41,43,97,101,131,157,181,233,239,271,311,353,401,421,491,

%T 521,541,599,617,631,647,673,743,811,859,953,1021,1031,1051,1093,1171,

%U 1201,1249,1259,1301,1303,1327,1373,1531,1601,1621,1801,1871,2029,2111,2129,2161

%N Prime numbers that give a remainder of 1 when divided by the sum of their digits.

%H Robert Israel, <a href="/A347702/b347702.txt">Table of n, a(n) for n = 1..10000</a>

%e 97 is a term since its sum of digits is 9+7 = 16, and 97 mod 16 = 1.

%p select(t -> isprime(t) and t mod convert(convert(t,base,10),`+`) = 1, [seq(i,i=3..10000,2)]); # _Robert Israel_, Mar 05 2024

%t Select[Range[2000], PrimeQ[#] && Mod[#, Plus @@ IntegerDigits[#]] == 1 &] (* _Amiram Eldar_, Sep 10 2021 *)

%o (Python)

%o from sympy import primerange

%o def ok(p): return p%sum(map(int, str(p))) == 1

%o print(list(filter(ok, primerange(1, 2130)))) # _Michael S. Branicky_, Sep 10 2021

%o (PARI) isok(p) = isprime(p) && ((p % sumdigits(p)) == 1); \\ _Michel Marcus_, Sep 10 2021

%Y Cf. A000040, A007605, A136251.

%Y Subsequence of A209871.

%Y A259866 \ {31}, and the primes associated with A056804 \ {1, 2} and A056797 are subsequences.

%K nonn,base

%O 1,1

%A _Burak Muslu_, Sep 10 2021

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 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)