Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
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!)
A370577 Lexicographically earliest sequence such that for any value m, the number of distinct values between a pair of consecutive m's is distinct. 1
1, 1, 2, 1, 2, 2, 3, 1, 2, 3, 3, 4, 1, 2, 3, 4, 3, 4, 4, 5, 1, 2, 3, 4, 5, 5, 6, 1, 2, 3, 4, 5, 6, 4, 5, 6, 5, 6, 6, 7, 1, 2, 3, 4, 5, 6, 7, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 5, 6, 7, 8, 7, 8, 8, 9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 7, 8, 9, 9, 10, 1, 2, 3, 4, 5, 6, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
The first terms with the number of distinct values enclosed by m = 1..4 below:
n| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
...
a(n)| 1 1 2 1 2 2 3 1 2 3 3 4 1 2 3 4 3 4 4 5 1 2 3
...
----+---------------------------------------------------------------------
1's| 0, 1, 2, 3, 4,
...
2's| 1, 0, 2, 3, 4,
...
3's| 2, 0, 3, 1, 4,
...
4's| 3, 1, 0,
...
PROG
(Python)
from itertools import islice
def agen(): # generator of terms
e, a = set(), []
while True:
an, allnew = 0, False
while not allnew:
allnew, an, nd = True, an+1, None
for i in range(len(a)-1, -1, -1):
if an == a[i]:
nd = len(set(a[i+1:]))
if (an, nd) in e: allnew = False
break
yield an; a.append(an); e.add((an, nd))
print(list(islice(agen(), 86))) # Michael S. Branicky, Feb 22 2024
CROSSREFS
Sequence in context: A086421 A290399 A109400 * A333831 A202389 A210868
KEYWORD
nonn
AUTHOR
Neal Gersh Tolunsky, Feb 22 2024
EXTENSIONS
More terms from Michael S. Branicky, Feb 22 2024
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 August 2 11:30 EDT 2024. Contains 374838 sequences. (Running on oeis4.)