%I #12 Nov 26 2015 01:05:00
%S 1,2,6,3,4,8,7,5,12,9,10,14,15,11,17,13,22,18,16,19,20,23,29,24,25,21,
%T 26,28,31,38,27,30,44,32,37,43,33,34,48,35,36,39,46,54,45,40,41,49,47,
%U 50,57,52,53,42,51,59,56,63,55,58,60,61,75,65,73,67
%N Inverse of conjectured permutation A262942.
%H Robert Israel, <a href="/A262943/b262943.txt">Table of n, a(n) for n = 1..2500</a>
%p N:= 1000: # to get all terms of A262942 before the first > N
%p V:= Vector(N):
%p W:= Vector(N):
%p S:= Vector(N):
%p firstav:= 1;
%p for n from 1 to N do
%p forbid:= {seq(op([2*V[k]-V[2*k-n], 2*V[2*k-n]-V[k], (V[k]+V[2*k-n])/2]), k=ceil((n+1)/2)..n-1)};
%p for v from firstav to N do
%p if S[v] <> 0 and v = firstav then firstav:= v+1 fi;
%p if S[v] = 0 and not member(v, forbid) then
%p V[n]:= v;
%p W[v]:= n;
%p S[v]:= 1;
%p break
%p fi
%p od;
%p if v > N then break fi;
%p od:
%p seq(W[i],i=1..firstav-1); # _Robert Israel_, Nov 23 2015
%Y Cf. A262942, A229037.
%K nonn
%O 1,2
%A _Max Barrentine_, Oct 05 2015
%E Corrected and extended by _Robert Israel_, Nov 23 2015
|