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!)
A332864 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). 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Samuel B. Reid, Table of n, a(n) for n = 1..10000

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

Cf. A309681, A331910.

Sequence in context: A181642 A011358 A160188 * A337569 A322081 A279396

Adjacent sequences:  A332861 A332862 A332863 * A332865 A332866 A332867

KEYWORD

nonn

AUTHOR

Samuel B. Reid, Feb 27 2020

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 April 20 06:59 EDT 2021. Contains 343125 sequences. (Running on oeis4.)