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!)
A296768 Initially let b(i)=i for all i > 0. On the k-th pass, exchange b(k+1) with b(b(k+1) + b(k)). The sequence is the limit of these sequences as k goes to infinity. 0
1, 3, 5, 9, 11, 17, 24, 32, 36, 46, 48, 60, 73, 87, 102, 118, 124, 142, 161, 181, 202, 224, 247, 254, 279, 305, 332, 360, 389, 419, 450, 458, 491, 525, 560, 564, 601, 639, 678, 718, 759, 801, 844, 888, 933, 943, 990, 992, 1041, 1091, 1142, 1194, 1247, 1301, 1356, 1412, 1469, 1527, 1586, 1598, 1659, 1721, 1784, 1848, 1913, 1979, 2046 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
Initially the sequence {b[n]} is {1,2,3,4,5,...};
on the first pass, exchange b(2) with b(b(2) + b(1)) to give {1,3,2,4,5,...};
on the second pass, exchange b(3) with b(b(3) + b(2)), that is, exchange b(3) with b(5) to give {1,3,5,4,2,...}.
MATHEMATICA
For[n = 0, n <= 1000, n++, a[n] = n];
iend = 48;
For[k = 2, k <= iend, k++, t = Table[a[n], {n, 1, iend}]; Print[k, t];
temp = a[k]; index = a[a[k] + a[k - 1]]; a[k] = index;
a[index] = temp];
(* Second program: *)
With[{nn = 67}, Take[#, nn] &@ Fold[ReplacePart[#1, {#2 + 1 -> #1[[Total@ #1[[#2 ;; #2 + 1]] ]], #1[[Total@ #1[[#2 ;; #2 + 1]] ]] -> #1[[#2 + 1]] } ] &, Range[nn^2], Range@ nn] ] (* Michael De Vlieger, Dec 20 2017 *)
CROSSREFS
Sequence in context: A007952 A145819 A317827 * A302596 A230721 A094509
KEYWORD
nonn
AUTHOR
David S. Newman, Dec 19 2017
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 16 16:13 EDT 2024. Contains 371749 sequences. (Running on oeis4.)