login
a(n) = A102568(A102568(n)).
2

%I #14 May 03 2023 09:54:43

%S 1,2,3,4,5,6,10,12,7,14,8,16,18,9,20,11,48,13,28,15,31,17,36,19,38,21,

%T 22,80,44,23,43,24,25,26,51,52,27,55,29,30,58,60,32,64,66,33,34,70,68,

%U 35,144,37,76,39,79,40,41,42,87,84,45,46,94,92,47,192,49,50,99,100,53

%N a(n) = A102568(A102568(n)).

%C Inverse permutation to A102571.

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%t nmax = 100;

%t A102568 = Nest[Append[#, If[#[[-1]] == #[[-2]]+1, 2 #[[-1]], Min[Complement[Range[Max[#]+1], #]]]]&, {1, 2}, 2 nmax];

%t a[n_ /; n <= Length[A102568]] := A102568[[A102568[[n]]]];

%t Table[a[n], {n, 1, nmax}] (* _Jean-François Alcover_, May 03 2023, after _Ivan Neretin_ in A102568 *)

%Y Cf. A102568, A102571.

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Jan 15 2005