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.

A309734 Inverse permutation to A309668.

This page as a plain text file.
%I A309734 #9 Apr 23 2020 20:45:51
%S A309734 1,2,5,4,3,10,9,8,7,6,11,20,19,18,17,16,15,14,13,25,12,23,22,21,40,38,
%T A309734 37,36,35,34,33,32,31,30,29,28,27,53,26,50,49,24,47,46,45,44,43,42,41,
%U A309734 81,79,39,76,75,74,72,71,70,69,68,67,66,65,64,63,62,61
%N A309734 Inverse permutation to A309668.
%H A309734 Robert Israel, <a href="/A309734/b309734.txt">Table of n, a(n) for n = 1..10000</a>
%H A309734 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e A309734 A309668(5) = 3, hence a(3) = 5.
%p A309734 S:= [$1..100]:
%p A309734 for n from 1 while S <> [] do
%p A309734   for i from 1 to nops(S) do
%p A309734     s:= S[i];
%p A309734     if ilog2(n*s+n-1) > ilog2(n*s-1) then
%p A309734       A[s]:= n;
%p A309734       S:= subsop(i=NULL,S);
%p A309734       break
%p A309734     fi
%p A309734 od od:
%p A309734 seq(A[i],i=1..100); # _Robert Israel_, Apr 23 2020
%Y A309734 Cf. A309668.
%K A309734 nonn,base,look
%O A309734 1,2
%A A309734 _Rémy Sigrist_, Aug 14 2019