OFFSET
0,3
COMMENTS
See A075166.
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..1024
A. Karttunen, Alternative Catalan Orderings (with the complete Scheme source)
PROG
(Scheme functions showing the essential idea. For the complete source, follow the "Alternative Catalan Orderings" link:)
(define (A075161 n) (CatalanRankGlobal (parenthesization->binexp (primefactorization->parenthesization (1+ n)))))
(define (primefactorization->parenthesization n) (map primefactorization->parenthesization (explist->Nvector! (primefactorization->explist n))))
Function primefactorization->explist maps 1 to (), 2 to (1), 3 to (1 0), 4 to (2), 12 to (1 2), etc.
(define (explist->Nvector! el) (cond ((pair? el) (let loop ((el (cdr el))) (cond ((pair? el) (set-car! el (1+ (car el))) (loop (cdr el))))))) el)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 13 2002
STATUS
approved