%I #5 May 01 2014 02:44:54
%S 0,1,2,3,4,5,8,7,15,6,9,14,11,23,24,17,26,31,63,80,511,255,65535,10,
%T 13,20,19,39,34,29,44,47,95,134,767,383,98303,48,49,74,35,71,124,53,
%U 242,127,1023,728,32767,4095,16777215,624,161,19682,33554431,262143,6560
%N Position of A014486(n) in A075165, minus one.
%C See A075166.
%H A. Karttunen, <a href="http://www.iki.fi/~kartturi/matikka/Nekomorphisms/ACO1.htm">Alternative Catalan Orderings</a> (with the complete Scheme source)
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%o (Scheme functions showing the essential idea. For the complete source, follow the "Alternative Catalan Orderings" link:)
%o (define (A075162 n) (-1+ (parenthesization->primefactorization (binexp->parenthesization (A014486 n)))))
%o (define (parenthesization->primefactorization p) (Nvector->primefactorization! (map parenthesization->primefactorization p)))
%o (define (Nvector->primefactorization! el) (let loop ((el (reverse! el)) (i 1) (z 1)) (cond ((null? el) z) ((null? (cdr el)) (* (expt (A008578 i) (car el)) z)) (else (loop (cdr el) (1+ i) (* (expt (A008578 i) (-1+ (car el))) z))))))
%Y Inverse of A075161. a(n) = A075164(n+1)-1. Cf. A075157, A075169.
%K nonn
%O 0,3
%A _Antti Karttunen_, Sep 13 2002
|