A232560 Inverse permutation of the sequence of positive integers at A232559.
1, 2, 3, 4, 6, 5, 8, 7, 11, 10, 16, 9, 14, 13, 21, 12, 19, 18, 29, 17, 27, 26, 42, 15, 24, 23, 37, 22, 35, 34, 55, 20, 32, 31, 50, 30, 48, 47, 76, 28, 45, 44, 71, 43, 69, 68, 110, 25, 40, 39, 63, 38, 61, 60, 97, 36, 58, 57, 92, 56, 90, 89, 144, 33, 53, 52
Offset: 1
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000 (first 1000 terms from Clark Kimberling)
- Index entries for sequences that are permutations of the natural numbers
Programs
-
Maple
g:= proc() local l, s; l, s:= [1], {1}: proc(n) option remember; local i, r; r:= l[1]; l:= subsop(1=NULL, l); for i in [1+r, r+r] do if not i in s then l, s:=[l[], i], s union {i} fi od; r end end(): a:= proc() local t, a; t, a:= 0, proc() -1 end; proc(n) local h; while a(n) < 0 do t:= t+1; h:= g(t); if a(h) < 0 then a(h):= t fi od; a(n) end end(): seq(a(n), n=1..100); # Alois P. Heinz, Sep 14 2021
-
Mathematica
z = 12; g[1] = {1}; g[2] = {2}; g[n_] := Riffle[g[n - 1] + 1, 2 g[n - 1]]; j[2] = Join[g[1], g[2]]; j[n_] := Join[j[n - 1], g[n]]; g1[n_] := DeleteDuplicates[DeleteCases[g[n], Alternatives @@ j[n - 1]]]; g1[1] = g[1]; g1[2] = g[2]; t = Flatten[Table[g1[n], {n, 1, z}]] (* A232559 *) Table[Length[g1[n]], {n, 1, z}] (* Fibonacci numbers *) t1 = Flatten[Table[Position[t, n], {n, 1, 200}]] (* A232560 *)
Comments