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!)
A109207 Palindromic primes with digit sum = 50. 2

%I #16 Dec 18 2015 11:15:39

%S 3998993,7696967,7778777,7794977,7868687,7884887,7958597,9586859,

%T 9758579,9782879,9938399,138989831,139969931,148888841,148969841,

%U 157888751,159929951,166888661,167787761,168929861,169666961,174989471

%N Palindromic primes with digit sum = 50.

%H Chai Wah Wu, <a href="/A109207/b109207.txt">Table of n, a(n) for n = 1..13935</a>

%t Do[p=Join[IntegerDigits[n], Reverse[Drop[IntegerDigits[n], -1]]]; q=Plus@@p; If[PrimeQ[FromDigits[p]]&&q==50, Print[FromDigits[p]]], {n, 1, 10^7}] (* _Vincenzo Librandi_, Dec 18 2015 *)

%t Select[Prime@ Range[10^7], And[# == Reverse@ #, Total@ # == 50] &@ IntegerDigits@ # &] (* _Michael De Vlieger_, Dec 18 2015 *)

%o (PARI) isok(n) = isprime(n) && (d=digits(n)) && (Vecrev(d)==d) && (sumdigits(n)==50); \\ _Michel Marcus_, Dec 18 2015

%Y Cf. A070250, A109184, A109185 (resp.) Palindromic primes with digit sum = 10, 20, 40 (resp.); A107579, A106760 (resp.) Primes with digit sum = 10, 20 (resp.).

%K base,nonn

%O 1,1

%A _Zak Seidov_, Jun 22 2005

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 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)