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.

Showing 1-7 of 7 results.

A209638 Sequence A209636 (or A209637) sorted into ascending order.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 16, 17, 19, 20, 22, 24, 26, 28, 29, 31, 32, 34, 37, 38, 40, 41, 43, 44, 48, 52, 53, 56, 58, 59, 62, 64, 67, 68, 71, 74, 76, 79, 80, 82, 86, 88, 89, 96, 101, 104, 106, 107, 109, 112, 116, 118, 124, 127, 128, 131, 134
Offset: 0

Views

Author

Antti Karttunen, Mar 11 2012

Keywords

Comments

These are Matula-numbers (see A061773) for the rooted trees where no vertices with more than one non-leaf branch ever occur. In other words, natural numbers which are either some power of 2, or of the form 2^k * p_i, where k >= 0, and p_i is the i-th prime (A000040(i)), with i being one of the terms of this sequence.

Crossrefs

Sorted version of A209636 and A209637.
Subset of A093641 and A122132.

Programs

  • 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(sorted([a(n) for n in range(101)])) # Indranil Ghosh, May 26 2017

A278541 a(n) = A046523(A209636(n)).

Original entry on oeis.org

1, 2, 4, 2, 8, 6, 2, 2, 16, 12, 6, 6, 2, 2, 2, 2, 32, 24, 12, 12, 6, 6, 6, 6, 2, 2, 2, 2, 2, 2, 2, 2, 64, 48, 24, 24, 12, 12, 12, 12, 6, 6, 6, 6, 6, 6, 6, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 128, 96, 48, 48, 24, 24, 24, 24, 12, 12, 12, 12, 12, 12, 12, 12, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 0

Views

Author

Antti Karttunen, Nov 30 2016

Keywords

Crossrefs

Programs

Formula

a(n) = A046523(A209636(n)).
a(n) = A278542(A054429(n)).

A227413 a(1)=1, a(2n)=nthprime(a(n)), a(2n+1)=nthcomposite(a(n)), where nthprime = A000040, nthcomposite = A002808.

Original entry on oeis.org

1, 2, 4, 3, 6, 7, 9, 5, 8, 13, 12, 17, 14, 23, 16, 11, 10, 19, 15, 41, 22, 37, 21, 59, 27, 43, 24, 83, 35, 53, 26, 31, 20, 29, 18, 67, 30, 47, 25, 179, 58, 79, 34, 157, 54, 73, 33, 277, 82, 103, 40, 191, 62, 89, 36, 431, 114, 149, 51, 241, 75, 101, 39, 127, 46
Offset: 1

Views

Author

Antti Karttunen, Jul 10 2013

Keywords

Comments

Inverse permutation of A135141.
Shares with A073846 the property that the other bisection consists of just primes and the other bisection of just nonprimes.

Crossrefs

Similarly constructed permutations: A227402, A227404, A227410, A227412. Cf. also A073846, A209636.

Programs

  • Haskell
    import Data.List (transpose)
    a227413 n = a227413_list !! (n-1)
    a227413_list = 1 : concat (transpose [map a000040 a227413_list,
                                          map a002808 a227413_list])
    -- Reinhard Zumkeller, Jan 29 2014

Formula

a(1)=1, a(2n) = A000040(a(n)), a(2n+1) = A002808(a(n)).
A007097(n) = a(A000079(n)).

A071162 Simple rewriting of binary expansion of n resulting A014486-codes for rooted binary trees with height equal to number of internal vertices. (Binary trees where at each internal vertex at least the other child is leaf).

Original entry on oeis.org

0, 2, 10, 12, 42, 44, 52, 56, 170, 172, 180, 184, 212, 216, 232, 240, 682, 684, 692, 696, 724, 728, 744, 752, 852, 856, 872, 880, 936, 944, 976, 992, 2730, 2732, 2740, 2744, 2772, 2776, 2792, 2800, 2900, 2904, 2920, 2928, 2984, 2992, 3024, 3040, 3412, 3416
Offset: 0

Views

Author

Antti Karttunen, May 14 2002

Keywords

Comments

Essentially rewrites in binary expansion of n each 0 -> 01, 1X -> 1(rewrite X)0, where X is the maximal suffix after the 1-bit, which will be rewritten recursively (see the given Scheme-function). Because of this, the terms of the binary length 2n are counted by 2's powers, A000079.
In rooted plane (general) tree context, these are those totally balanced binary sequences (terms of A014486) where non-leaf subtrees can occur only as the rightmost branch (at any level of a general tree), but nowhere else. (Cf. A209642).
Also, these are exactly those rooted plane trees whose Łukasiewicz words happen to be valid asynchronous siteswap juggling patterns. (This was the original, albeit quite frivolous definition of this sequence for almost ten years 2002-2012. Cf. A071160.)

Crossrefs

a(n) = A014486(A071163(n)) = A036044(A209642(n)) = A056539(A209642(n)).
A209859 provides an "inverse" function, i.e. A209859(a(n)) = n for all n.

Programs

  • Python
    def a036044(n): return int(''.join('1' if i == '0' else '0' for i in bin(n)[2:][::-1]), 2)
    def a209642(n):
        s=0
        i=1
        while n!=0:
            if n%2==0:
                n//=2
                s=4*s + 1
            else:
                n=(n - 1)//2
                s=(s + i)*2
            i*=4
        return s
    def a(n): return 0 if n==0 else a036044(a209642(n))
    print([a(n) for n in range(101)]) # Indranil Ghosh, May 25 2017
  • Scheme
    (define (A071162 n) (let loop ((n n) (s 0) (i 1)) (cond ((zero? n) s) ((even? n) (loop (/ n 2) (+ s i) (* i 4))) (else (loop (/ (- n 1) 2) (* 2 (+ s i)) (* i 4))))))
    

A209637 Matula-numbers computed for rooted trees encoded by A071162 when interpreted in once-halved bit-tuple format.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 11 2012

Keywords

Comments

Sequence A209638 gives the same terms sorted into ascending order.

References

  • Mueller, Szymanski, Knop and Trinajstic, A Comparison between the Matula Numbers and Bit-tuple Notation for Rooted Trees J. Chem. Inf. Comput. Sci. 1995, 35, pp. 211--213.

Programs

  • Python
    from sympy import prime
    from mpmath import log
    def a054429(n): return 3*(2**int(log(n, 2))) - (n + 1)
    def a209636(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
    def a(n): return 1 if n==0 else a209636(a054429(n)) # Indranil Ghosh, May 26 2017

Formula

A242421 Fixed points of A153212: After a(1) = 1, numbers of the form p_i1^i1 * p_i2^(i2-i1) * p_i3^(i3-i2) * ... * p_ik^(ik-i_{k-1}), where p_i's are distinct primes present in the prime factorization of n, with i1 < i2 < i3 < ... < ik, and k = A001221(n) and ik = A061395(n).

Original entry on oeis.org

1, 2, 6, 9, 30, 45, 50, 125, 210, 294, 315, 350, 441, 686, 875, 2310, 2401, 3234, 3465, 3630, 3850, 4851, 5445, 6050, 7546, 7986, 9625, 11979, 15125, 26411, 29282, 30030, 35490, 42042, 45045, 47190, 49686, 50050, 53235, 59150, 63063, 65910, 70785, 74529, 78650, 98098, 98865, 103818, 109850, 115934, 125125, 147875, 155727, 161051, 171366, 196625, 257049, 274625, 343343, 380666, 405769, 510510
Offset: 1

Views

Author

Antti Karttunen, May 16 2014

Keywords

Comments

This sequence is closed with respect to A122111, i.e., for any n, A122111(a(n)) is either the same as a(n) or some other term a(k) of the sequence.
These numbers encode partitions in whose Young diagrams all pairs of successive horizontal and vertical segments (those pairs sharing "a common convex corner") are of equal length. Cf. the example-illustration at A153212.
Note: The seventh primorial, 510510 (= A002110(7)) occurs here as a term a(62).

Examples

			2 = p_1^1 is present, as the first prime index delta and exponent are equal.
3 = p_2^1 is not present, as 1 <> 2.
6 = p_1^1 * p_2^(2-1) is present.
9 = p_2^2 is present, as 2 = 2.
30 = p_1^1 * p_2^(2-1) * p_3^(3-2) is present, as all primorials are.
50 = p_1^1 * p_3^(3-1) is present also.
		

Crossrefs

Subsequences: A002110 (primorial numbers), A062457.

A243493 Value of Matula-Goebel signature at the fixed points of A069787: a(n) = A127301(A243490(n)).

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 5, 16, 12, 10, 14, 13, 11, 32, 24, 20, 28, 26, 22, 37, 23, 34, 31, 64, 48, 40, 56, 52, 44, 74, 46, 68, 62, 76, 39, 89, 61, 47, 86, 101, 118, 109, 127, 128, 96, 80, 112, 104, 88, 148, 92, 136, 124, 152, 78, 178, 122, 94, 172, 202, 236, 218, 254
Offset: 0

Views

Author

Antti Karttunen, Jun 07 2014

Keywords

Comments

The first duplicate value occurs at n=101, as a(101) = a(129) = 362. The corresponding A014486-indices are A243490(101) = 924 and A243490(129) = 1640, respectively.

Crossrefs

A243494 gives the same terms sorted into ascending order with duplicates removed.

Formula

a(n) = A127301(A243490(n)).
a(n) = A243491(A243490(n)).
For all n >= 0, a(A036256(n)-1) = A007097(n) and a(A036256(n)) = A000079(n+1).
Showing 1-7 of 7 results.