OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
11 has digital sum 2 which is less than the digital sum of the previous prime (7).
MATHEMATICA
s[n_] := Plus @@ IntegerDigits[n]; p = Select[Range[1000], PrimeQ]; p[[1 + Position[Differences[s /@ p], _?(# < 0 &)] // Flatten]] (* Amiram Eldar, Sep 26 2020 *)
Prime[#]&/@(Flatten[Position[Partition[Table[Total[IntegerDigits[Prime[n]]], {n, 200}], 2, 1], _?(#[[2]]<#[[1]]&), 1, Heads->False]]+1) (* Harvey P. Dale, Aug 05 2022 *)
PROG
(PARI) isok(p) = isprime(p) && (sumdigits(p) < sumdigits(precprime(p-1))); \\ Michel Marcus, Sep 26 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Anthony Winkelspecht, Sep 25 2020
STATUS
approved