Annual appeal: Please make a donation to keep the OEIS running!
Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".

A038567_A038566_to_SternBrocot_permutation := proc(u) local a, n, i; a := []; for n from 1 to u do for i from 1 to n do if (1 = igcd(n, i)) then a := [op(a), cfrac2binexp(convert((n/i), confrac))+1]; fi; od; od; RETURN(a); end; # cfrac2binexp given in A054424.