The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A154311 Numbers n such that sum of digits of n > sum of digits of prime(n). 1
5, 6, 9, 18, 26, 27, 28, 29, 36, 38, 47, 48, 49, 53, 54, 58, 64, 65, 66, 67, 68, 69, 79, 82, 83, 84, 86, 89, 96, 97, 98, 99, 126, 156, 169, 170, 172, 173, 174, 177, 178, 179, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 196, 197, 198, 199, 216, 252, 255, 257 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
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
Sequence in context: A227611 A124519 A322959 * A279702 A014980 A066901
KEYWORD
nonn,base
AUTHOR
EXTENSIONS
Missing terms added by Emeric Deutsch, Jan 26 2009
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 10 08:08 EDT 2024. Contains 373256 sequences. (Running on oeis4.)