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!)
A355506 a(n) is the least positive integer not occurring earlier in the sequence such that, if a(m) = a(n)+1, then |m - n| >= a(n). 1
1, 2, 4, 6, 8, 3, 10, 12, 5, 14, 16, 7, 18, 20, 22, 9, 24, 26, 11, 28, 30, 32, 13, 34, 36, 15, 38, 40, 42, 17, 44, 46, 19, 48, 50, 21, 52, 54, 56, 23, 58, 60, 25, 62, 64, 66, 27, 68, 70, 29, 72, 74, 31, 76, 78, 80, 33, 82, 84, 35, 86, 88, 90, 37, 92, 94, 39, 96, 98, 41, 100, 102, 104, 43, 106 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A permutation of the positive integers (or of the nonnegative integers, if prefixed by a(0) = 0). It seems that all the odd numbers occur in order at indices A184119 and the even numbers occur in order at indices A136119, except for the initial 1 and 2. - M. F. Hasler, Jul 04 2022
LINKS
EXAMPLE
The distance between a(3) = 4 and a(9) = 5 is |3 - 9| = 6, which is >= 4.
PROG
(PARI) {A355506_first(N, U=1/*starting value*/, A=Map())=vector(N, n, my(k=U); while(mapisdefined(A, k) || iferr(n < mapget(A, k-1)+k-1 || n<mapget(A, k+1)+k, E, ), k++); mapput(A, k, n); k==U && until(!mapisdefined(A, U), U>2 && mapdelete(A, U-2); U++); k)} \\ M. F. Hasler, Jul 05 2022
CROSSREFS
Cf. A353592 (inverse permutation).
Sequence in context: A179657 A239887 A354721 * A241012 A355213 A064745
KEYWORD
nonn
AUTHOR
Ali Sada, Jul 04 2022
EXTENSIONS
More terms from M. F. Hasler, Jul 04 2022
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 April 30 17:37 EDT 2024. Contains 372139 sequences. (Running on oeis4.)