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

 


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A349944 a (1) = 1; a(n) is the smallest number not yet present in the sequence such that the concatenation of a(n-1) and a(n) contains three consecutive descending digits d > e > f. 0
1, 210, 2, 10, 310, 3, 20, 320, 4, 21, 321, 5, 30, 410, 6, 31, 420, 7, 32, 11, 421, 8, 40, 430, 9, 41, 431, 12, 100, 432, 13, 101, 510, 14, 102, 103, 104, 105, 42, 15, 43, 16, 50, 520, 17, 51, 521, 18, 52, 19, 53, 22, 106, 54, 23, 107, 60, 530, 24, 108, 61
(list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A permutation of the positive integers.
LINKS
EXAMPLE
a(1) = 1;
a(2) = 210, because this is the smallest number not yet present in the sequence which, when concatenated with a(1) = 1 -> 1210, contains three consecutive digits 2 > 1 > 0;
a(3) = 2, because this is the smallest number not yet present in the sequence which, when concatenated with a(2) = 210 -> 2102, contains three consecutive digits 2 > 1 > 0;
a(4) = 10, because this is the smallest number not yet present in the sequence which, when concatenated with a(3) = 2 -> 210, contains three consecutive digits 2 > 1 > 0.
PROG
(Python)
is_ok = lambda s: any(s[i-2] > s[i-1] > s[i] for i in range(2, len(s)))
terms, appears = [1], {1}
for i in range(100):
t = 1
while t in appears or not is_ok(str(terms[-1]) + str(t)):
t += 1
terms.append(t); appears.add(t)
print(terms)
CROSSREFS
Sequence in context: A283153 A125549 A104876 * A259916 A050516 A100670
KEYWORD
nonn,base
AUTHOR
Gleb Ivanov, Dec 06 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | 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 September 18 14:58 EDT 2024. Contains 376000 sequences. (Running on oeis4.)