Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #24 Jul 07 2022 08:54:11
%S 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,
%T 38,40,42,17,44,46,19,48,50,21,52,54,56,23,58,60,25,62,64,66,27,68,70,
%U 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
%N 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).
%C 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
%H <a href="/index/Per#IntegerPermutation">OEIS Index to sequences related to permutations of the positive (or nonnegative) integers</a>.
%e The distance between a(3) = 4 and a(9) = 5 is |3 - 9| = 6, which is >= 4.
%o (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
%Y Cf. A184119, A136119.
%Y Cf. A353592 (inverse permutation).
%K nonn
%O 1,2
%A _Ali Sada_, Jul 04 2022
%E More terms from _M. F. Hasler_, Jul 04 2022