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.

A209636 Matula-numbers computed for rooted trees encoded by A071162/A071163.

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 7, 5, 16, 12, 14, 10, 19, 13, 17, 11, 32, 24, 28, 20, 38, 26, 34, 22, 53, 37, 43, 29, 67, 41, 59, 31, 64, 48, 56, 40, 76, 52, 68, 44, 106, 74, 86, 58, 134, 82, 118, 62, 131, 89, 107, 71, 163, 101, 139, 79, 241, 157, 191, 109, 331, 179, 277
Offset: 0

Views

Author

Antti Karttunen, Mar 11 2012

Keywords

Comments

Sequence is injective: Any number occurs at most once, as each plane tree encoded by A071162/A071163 is mapped to a unique non-oriented rooted tree. See also A209637, A209638.
Sequence A209638 gives the same terms sorted into ascending order.

Crossrefs

Programs

  • PARI
    A209636(n) = { my(n=2*n, m=1); while(n >= 2, if(!(n%2),m*=2,m = prime(m)); n\=2); m; } \\ Antti Karttunen, May 25 2017
    
  • Python
    from sympy import prime
    def a(n):
        n = 2*n
        m = 1
        if n<2: return 1
        while n>1:
            if n%2==0:
                n//=2
                m*=2
            else:
                n=(n - 1)//2
                m=prime(m)
        return m
    print([a(n) for n in range(101)]) # Indranil Ghosh, May 25 2017, translated from Antti Karttunen's SCHEME code
  • Scheme
    (define (A209636 n) (let loop ((n (* 2 n)) (m 1)) (cond ((< n 2) m) ((even? n) (loop (/ n 2) (* m 2))) (else (loop (/ (- n 1) 2) (A000040 m))))))
    

Formula

a(n) = A127301(A071163(n)) = A209637(A054429(n)).