[go: up one dir, main page]

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”).

A109207
Palindromic primes with digit sum = 50.
2
3998993, 7696967, 7778777, 7794977, 7868687, 7884887, 7958597, 9586859, 9758579, 9782879, 9938399, 138989831, 139969931, 148888841, 148969841, 157888751, 159929951, 166888661, 167787761, 168929861, 169666961, 174989471
OFFSET
1,1
MATHEMATICA
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 *)
Select[Prime@ Range[10^7], And[# == Reverse@ #, Total@ # == 50] &@ IntegerDigits@ # &] (* Michael De Vlieger, Dec 18 2015 *)
PROG
(PARI) isok(n) = isprime(n) && (d=digits(n)) && (Vecrev(d)==d) && (sumdigits(n)==50); \\ Michel Marcus, Dec 18 2015
CROSSREFS
Cf. A070250, A109184, A109185 (resp.) Palindromic primes with digit sum = 10, 20, 40 (resp.); A107579, A106760 (resp.) Primes with digit sum = 10, 20 (resp.).
Sequence in context: A047987 A234798 A146946 * A104930 A251614 A187599
KEYWORD
base,nonn
AUTHOR
Zak Seidov, Jun 22 2005
STATUS
approved