cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A232560 Inverse permutation of the sequence of positive integers at A232559.

This page as a plain text file.
%I A232560 #9 Sep 14 2021 14:59:43
%S A232560 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,
%T A232560 37,22,35,34,55,20,32,31,50,30,48,47,76,28,45,44,71,43,69,68,110,25,
%U A232560 40,39,63,38,61,60,97,36,58,57,92,56,90,89,144,33,53,52
%N A232560 Inverse permutation of the sequence of positive integers at A232559.
%H A232560 Alois P. Heinz, <a href="/A232560/b232560.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from Clark Kimberling)
%H A232560 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%p A232560 g:= proc() local l, s; l, s:= [1], {1}:
%p A232560       proc(n) option remember; local i, r; r:= l[1];
%p A232560         l:= subsop(1=NULL, l);
%p A232560         for i in [1+r, r+r] do if not i in s then
%p A232560           l, s:=[l[], i], s union {i} fi
%p A232560         od; r
%p A232560       end
%p A232560     end():
%p A232560 a:= proc() local t, a; t, a:= 0, proc() -1 end;
%p A232560       proc(n) local h;
%p A232560         while a(n) < 0 do
%p A232560           t:= t+1; h:= g(t);
%p A232560           if a(h) < 0 then a(h):= t fi
%p A232560         od; a(n)
%p A232560       end
%p A232560     end():
%p A232560 seq(a(n), n=1..100);  # _Alois P. Heinz_, Sep 14 2021
%t A232560 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 *)
%t A232560 Table[Length[g1[n]], {n, 1, z}] (* Fibonacci numbers *)
%t A232560 t1 = Flatten[Table[Position[t, n], {n, 1, 200}]]  (* A232560 *)
%Y A232560 Cf. A232559, A000045.
%K A232560 nonn,easy
%O A232560 1,2
%A A232560 _Clark Kimberling_, Nov 26 2013