login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

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 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A026142 For n >= 2, let h=[ (n+1)/2 ], L=n-h, R=n+h; a(L)=n if a(L) not yet defined, else a(R)=n; thus |a(n)-n| = [ (a(n)+1)/2 ]. 12
1, 4, 2, 8, 3, 12, 14, 5, 6, 20, 7, 24, 26, 9, 10, 32, 11, 36, 38, 13, 42, 44, 15, 16, 50, 17, 18, 56, 19, 60, 62, 21, 22, 68, 23, 72, 74, 25, 78, 80, 27, 28, 86, 29, 30, 92, 31, 96, 98, 33, 34, 104, 35, 108, 110, 37, 114, 116, 39, 40, 122, 41, 126, 128, 43, 132 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Sean A. Irvine, Table of n, a(n) for n = 1..10000

F. M. Dekking, Permutations of N generated by left-right filling algorithms, arXiv:2001.08915 [math.CO], 2020.

MATHEMATICA

Block[{a, nn = 132}, a[1] = 1; Do[If[! IntegerQ[a[#1]], Set[a[#1], i], Set[a[#2], i]] & @@ {i - #, i + #} &@ Floor[(i + 1)/2], {i, nn}]; TakeWhile[Array[a[#] &, nn], IntegerQ]] (* Michael De Vlieger, Apr 17 2020 *)

CROSSREFS

Sequence in context: A133640 A065171 A026192 * A095399 A250718 A068504

Adjacent sequences:  A026139 A026140 A026141 * A026143 A026144 A026145

KEYWORD

nonn

AUTHOR

Clark Kimberling

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 December 9 08:17 EST 2021. Contains 349627 sequences. (Running on oeis4.)