OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
EXAMPLE
If prime(n=5)=11 and 5>1+1=2, then 5=a(1). If prime(n=9)=23 and 9>2+3=5, then 9=a(2). If prime(n=18)=61 and 1+8=9>6+1=7, then 18=a(3). If prime(n=26)=101 and 2+6=8>1+0+1=2, then 26=a(4), etc.
MAPLE
sd := proc (n) options operator, arrow: add(convert(n, base, 10)[j], j = 1 .. nops(convert(n, base, 10))) end proc: a := proc (n) if sd(ithprime(n)) < sd(n) then n else end if end proc: seq(a(n), n = 1 .. 300); # Emeric Deutsch, Jan 26 2009
MATHEMATICA
Select[Range[300], Total[IntegerDigits[#]]>Total[IntegerDigits[ Prime[#]]]&] (* Harvey P. Dale, Jun 18 2011 *)
PROG
(PARI) isok(n) = sumdigits(n) > sumdigits(prime(n)); \\ Michel Marcus, Sep 10 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Juri-Stepan Gerasimov, Jan 07 2009
EXTENSIONS
Missing terms added by Emeric Deutsch, Jan 26 2009
STATUS
approved