The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A116068 Numbers k such that k has nondecreasing digits and the k-th prime has nonincreasing digits. 3
 1, 2, 3, 4, 5, 11, 13, 14, 16, 18, 23, 25, 47, 67, 115, 116, 117, 119, 133, 135, 137, 147, 156, 166, 167, 168, 456, 566, 1166, 1167, 1168, 1178, 1179, 1199, 1225, 1226, 1229, 2479, 3566, 3569, 45567, 67999 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS No more terms < 200000. - Stefan Steinerberger, Mar 19 2006 No more terms < 10 million. - Harvey P. Dale, Sep 25 2014 No more terms < 1 billion. - Michael S. Branicky, Jun 27 2022 LINKS Table of n, a(n) for n=1..42. EXAMPLE prime(67999) = 855331. MATHEMATICA For[n = 1, n < 70000, n++, a := IntegerDigits[n]; c := 0; For[m = 1, m <= Length[a] -1, m++, If[a[[m]] > a[[m + 1]], c := 1; ]]; If[c == 0, a:=IntegerDigits[Prime[n]]; For[m = 1, m <= Length[a] - 1, m++, If[a[[m]] < a[[m + 1]], c := 1; ]]]; If[c == 0, Print[n]]] (* Stefan Steinerberger, Mar 19 2006 *) nddQ[n_]:=Min[Differences[IntegerDigits[n]]]>-1&&Max[Differences[ IntegerDigits[ Prime[ n]]]]<1; Select[Range[70000], nddQ] (* Harvey P. Dale, Sep 25 2014 *) PROG (Python) from sympy import sieve from itertools import count, islice, combinations_with_replacement as mc def ni(n): s = str(n); return s == "".join(sorted(s, reverse=True)) def bgen(d): yield from map(int, ("".join(m) for m in mc("123456789", d))) def agen(): for d in count(1): yield from (k for k in bgen(d) if ni(sieve[k])) print(list(islice(agen(), 42))) # Michael S. Branicky, Jun 26 2022 CROSSREFS Cf. A116066, A116067, A116069. Sequence in context: A130640 A214653 A234142 * A104420 A188532 A181288 Adjacent sequences: A116065 A116066 A116067 * A116069 A116070 A116071 KEYWORD nonn,base,more AUTHOR Giovanni Resta, Feb 13 2006 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.

Last modified September 17 16:56 EDT 2024. Contains 375990 sequences. (Running on oeis4.)