login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A158085 Starting at a(1)=2, a(n) is the smallest prime larger than a(n-1) such that the sum of odd digits of a(n) is not smaller than the sum of odd digits of a(n-1). 1
2, 3, 5, 7, 17, 19, 37, 59, 79, 97, 179, 197, 199, 379, 397, 577, 599, 797, 977, 997, 1979, 1997, 1999, 5779, 7759, 7993, 9199, 9397, 9739, 9973, 13799, 13997, 13999, 17599, 17959, 17977, 19597, 19759, 19777, 19979 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

"Odd digits" means odd-valued digits (not digits in odd-indexed positions).

LINKS

Table of n, a(n) for n=1..40.

FORMULA

A071649(a(n)) >= A071649(a(n-1)). - R. J. Mathar, Feb 02 2015

EXAMPLE

The sequence of the sums of odd digits is 0, 3=3, 5=5, 7=7, 1+7=8, 1+9=10, 3+7=10, 5+9=14, 7+9=16, 9+7=16, 1+7+9=17, 1+9+7=17, 1+9+9=19 and so on. - R. J. Mathar, Feb 02 2015

MAPLE

A158085 := proc(n)

    option remember;

    if n =1 then

        2;

    else

        for a from procname(n-1)+1 do

            if isprime(a) then

                if A071649(a) >= A071649(procname(n-1)) then

                    return a;

                end if;

            end if;

        end do:

end if; # R. J. Mathar, Feb 02 2015

MATHEMATICA

spl[n_]:=Module[{sod=Total[Select[IntegerDigits[n], OddQ]], p1= NextPrime[ n]}, While[ Total[ Select[ IntegerDigits[ p1], OddQ]]<sod, p1=NextPrime[ p1]]; p1]; NestList[spl, 2, 40] (* Harvey P. Dale, Nov 15 2018 *)

CROSSREFS

Sequence in context: A061248 A059498 A247147 * A119833 A127049 A142885

Adjacent sequences:  A158082 A158083 A158084 * A158086 A158087 A158088

KEYWORD

nonn,base,less

AUTHOR

Juri-Stepan Gerasimov, Mar 12 2009

EXTENSIONS

Corrected (997 inserted, 1699 removed, 9199 to 9739 inserted) by R. J. Mathar, May 19 2010

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 8 18:37 EST 2019. Contains 329865 sequences. (Running on oeis4.)