OFFSET
1,1
COMMENTS
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..10000
EXAMPLE
19 is in the sequence because it is prime; [digitsum(19) = 1 + 9 = 10] > [digitsum(23) = 2 + 3 = 5] where 19 and 23 are consecutive primes.
47 is in the sequence because it is prime; [digitsum(47) = 4 + 7 = 11] > [digitsum(53) = 5 + 3 = 8] where 47 and 53 are consecutive primes.
MAPLE
MATHEMATICA
A261338 = {}; Do[p = Prime[n]; k = Plus @@ IntegerDigits[p]; k1 = Plus @@ IntegerDigits[NextPrime[p]]; If[k > k1, AppendTo[A261338, p]], {n, 1, 300}]; A261338 (* Bajpai *)
Prime[Select[Range[100], (Plus@@IntegerDigits[Prime[#]]) >
(Plus@@IntegerDigits[Prime[# + 1]]) &] (* Alonso del Arte, Aug 16 2015 *)
Prime[#]&/@SequencePosition[Table[Total[IntegerDigits[p]], {p, Prime[Range[ 150]]}], _?(#[[1]]>#[[2]]&)][[All, 1]]//Quiet (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Oct 10 2020 *)
PROG
(PARI) forprime(p = 1, 300, q=nextprime(p+1); if(sumdigits(p) > sumdigits(q), print1(p, ", ")));
(Magma) [NthPrime(n) : n in [1..200] | &+Intseq(NthPrime(n)) ge &+Intseq(NthPrime(n+1))];
CROSSREFS
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Aug 15 2015
STATUS
approved