login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A342264 Lexicographically earliest sequence of distinct nonnegative terms such that both a(n) and a(n) + a(n+1) have digits in nondecreasing order. 2
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 11, 12, 14, 15, 18, 16, 17, 19, 25, 22, 23, 24, 33, 26, 29, 27, 28, 38, 39, 49, 66, 45, 34, 35, 44, 55, 56, 57, 58, 59, 67, 46, 68, 47, 69, 48, 77, 36, 78, 37, 79, 88, 89, 99, 123, 111, 112, 113, 114, 115, 118, 116, 117, 119, 125, 122, 124, 133, 126, 129, 127, 128, 138 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

10 is obviously the first integer not present in the sequence as 1 > 0.

LINKS

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

EXAMPLE

a(10) = 9 and a(11) = 13 sum up to 22: the three numbers have digits in nondecreasing order;

a(11) = 13 and a(12) = 11 sum up to 24 (same property);

a(12) = 11 and a(13) = 12 sum up to 23 (same property); etc.

PROG

(Python)

def nondec(n): s = str(n); return s == "".join(sorted(s))

def aupton(terms):

  alst = [0]

  for n in range(2, terms+1):

    an = 1

    while True:

      while an in alst: an += 1

      if nondec(an) and nondec(alst[-1]+an): alst.append(an); break

      else: an += 1

  return alst

print(aupton(74)) # Michael S. Branicky, Mar 07 2021

CROSSREFS

Cf. A009994 (numbers with digits in nondecreasing order), A342265 and A342266 (variations on the same idea).

Sequence in context: A081549 A085889 A342951 * A094823 A032973 A174887

Adjacent sequences:  A342261 A342262 A342263 * A342265 A342266 A342267

KEYWORD

base,nonn

AUTHOR

Eric Angelini and Carole Dubois, Mar 07 2021

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 September 18 22:05 EDT 2021. Contains 347546 sequences. (Running on oeis4.)