The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A261338 Primes p such that digitsum(p) > digitsum(q) where q is the next prime after p. 1
 7, 19, 29, 37, 47, 59, 67, 79, 89, 97, 109, 127, 149, 157, 167, 179, 199, 229, 239, 257, 269, 277, 293, 307, 317, 349, 359, 367, 379, 389, 397, 419, 439, 449, 457, 479, 487, 499, 509, 557, 569, 587, 599, 607, 619, 647, 659, 677, 683, 691, 719, 727, 739, 743, 757 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS A000040(n) for n such that A007605(n) > A007605(n+1). - Robert Israel, Aug 17 2015 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 with(numtheory): A261338:= proc() local k, k1, p; p:=ithprime(n); k:=(add(d, d=convert(p, base, 10))); k1:=(add(d, d=convert(nextprime(p), base, 10))); if k > k1 then RETURN (p); fi; end: seq(A261338 (), n=1..300); 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 Cf. A000040, A007605. Sequence in context: A175366 A117609 A122072 * A109355 A272404 A274971 Adjacent sequences:  A261335 A261336 A261337 * A261339 A261340 A261341 KEYWORD nonn,base AUTHOR K. D. Bajpai, Aug 15 2015 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 5 08:27 EDT 2021. Contains 346464 sequences. (Running on oeis4.)