[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Search: a331910 -id:a331910
     Sort: relevance | references | number | modified | created      Format: long | short | data
Lexicographically earliest sequence of positive integers with the property that the distance between the first appearance of n and the first appearance of n+1 is a(n).
+0
2
1, 2, 1, 3, 4, 1, 1, 5, 1, 1, 1, 6, 7, 8, 1, 1, 1, 1, 9, 10, 11, 12, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 14, 1, 1, 1, 1, 1, 1, 1, 15, 16, 17, 18, 19, 1, 1, 1, 1, 1, 1, 1, 1, 20, 1, 1, 1, 1, 1, 1, 1, 1, 1, 21, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 22, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 24, 25, 26, 27, 28
OFFSET
1,2
LINKS
Samuel B. Reid, C program for A332864
Samuel B. Reid, Graph of 10000 terms
PROG
(C) See Links section.
(Python)
a = [1]
for n in range(1, 30):
a += [1] * (a[n-1]-1)
a.append(n+1)
print(a)
# Andrey Zabolotskiy, Feb 28 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Samuel B. Reid, Feb 27 2020
STATUS
approved

Search completed in 0.006 seconds