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-10 of 11 results. Next

A075167 Number of edges in each rooted plane tree produced with the unranking algorithm presented in A075166, which is based on prime factorization.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 3, 3, 4, 5, 4, 6, 5, 4, 3, 7, 4, 8, 5, 5, 6, 9, 4, 4, 7, 4, 6, 10, 5, 11, 4, 6, 8, 5, 5, 12, 9, 7, 5, 13, 6, 14, 7, 5, 10, 15, 5, 5, 5, 8, 8, 16, 5, 6, 6, 9, 11, 17, 6, 18, 12, 6, 4, 7, 7, 19, 9, 10, 6, 20, 5, 21, 13, 5, 10, 6, 8, 22, 6, 4, 14, 23, 7, 8, 15, 11, 7, 24, 6, 7, 11
Offset: 1

Views

Author

Antti Karttunen, Sep 13 2002

Keywords

Comments

Each n occurs A000108(n) times in total.

Crossrefs

Permutation of A072643 and A106457.
A253782 gives the positions where this sequence differs from A252464 (first time at n=16).
Cf. also A106490.

Formula

a(n) = A106457(A106442(n)). - Antti Karttunen, May 09 2005
From Antti Karttunen, Jan 16 2015: (Start)
a(1) = 0; for n>1: a(n) = a(A071178(n)) + (A061395(n) - A061395(A051119(n))) + A253783(A051119(n)).
Other identities.
For all n >= 2, a(n) = A055642(A075166(n))/2. [Half of the number of decimal digits in A075166(n).]
For all n >= 2, a(n) = A029837(1+A075165(n))/2. [Half of the binary width of A075165(n).]
For all n >= 1, a(n) = A000120(A075165(n)). [Thus also the binary weight of A075165(n), because half of the bits are zeros.]
(End)

Extensions

More terms from Antti Karttunen, May 09 2005

A106442 Exponent-recursed cross-domain bijection from N to GF(2)[X]. Position of A075166(n) in A106456.

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 6, 11, 8, 5, 14, 13, 12, 19, 22, 9, 16, 25, 10, 31, 28, 29, 26, 37, 24, 21, 38, 15, 44, 41, 18, 47, 128, 23, 50, 49, 20, 55, 62, 53, 56, 59, 58, 61, 52, 27, 74, 67, 192, 69, 42, 43, 76, 73, 30, 35, 88, 33, 82, 87, 36, 91, 94, 39, 64, 121, 46, 97, 100, 111, 98
Offset: 0

Views

Author

Antti Karttunen, May 09 2005

Keywords

Comments

This map from the multiplicative domain of N to that of GF(2)[X] preserves Catalan-family structures, e.g. A106454(n) = a(A075164(n)), A075163(n) = A106453(a(n)), A075165(n) = A106455(a(n)), A075166(n) = A106456(a(n)), A075167(n) = A106457(a(n)). Shares with A091202 and A106444 the property that maps A000040(n) to A014580(n). Differs from the former for the first time at n=32, where A091202(32)=32, while a(32)=128. Differs from the latter for the first time at n=48, where A106444(48)=48, while a(48)=192.

Examples

			a(5) = 7, as 5 is the 3rd prime and the third irreducible GF(2)[X] polynomial x^2+x+1 is encoded as A014580(3) = 7. a(32) = a(2^5) = A048723(A014580(1),a(5)) = A048723(2,7) = 128. a(48) = a(3 * 2^4) = 3 X A048723(2,a(4+1)-1) = 3 X A048723(2,7-1) = 3 X 64 = 192.
		

Crossrefs

Inverse: A106443. a(n) = A106454(A075163(n)).

Formula

a(0)=0, a(1)=1, a(p_i) = A014580(i) for primes p_i with index i and for composites n = p_i^e_i * p_j^e_j * p_k^e_k * ..., a(n) = A048723(a(p_i), a(e_i)) X A048723(a(p_j), a(1+e_j)-1) X A048723(a(p_k), a(1+e_k)-1) X ..., where X stands for carryless multiplication of GF(2)[X] polynomials (A048720) and A048723(n, y) raises the n-th GF(2)[X] polynomial to the y:th power. Here p_i is the most significant prime in the factorization of n; its exponent e_i is not incremented before the recursion step, while the exponents of less significant primes e_j, e_k, ... are incremented by one before recursing and the result of the recursion is decremented by one before use.

A106443 Exponent-recursed cross-domain bijection from GF(2)[X] to N. Position of A106456(n) in A075166.

Original entry on oeis.org

0, 1, 2, 3, 4, 9, 6, 5, 8, 15, 18, 7, 12, 11, 10, 27, 16, 81, 30, 13, 36, 25, 14, 33, 24, 17, 22, 45, 20, 21, 54, 19, 512, 57, 162, 55, 60, 23, 26, 63, 72, 29, 50, 51, 28, 135, 66, 31, 768, 35, 34, 19683, 44, 39, 90, 37, 40, 99, 42, 41, 108, 43, 38, 75, 64, 225, 114, 47
Offset: 0

Views

Author

Antti Karttunen, May 09 2005

Keywords

Comments

This map from the multiplicative domain of GF(2)[X] to that of N preserves Catalan-family structures, e.g. A075164(n) = a(A106454(n)), A106453(n) = A075163(a(n)), A106455(n) = A075165(a(n)), A106456(n) = A075166(a(n)), A106457(n) = A075167(a(n)). Shares with A091203 and A106445 the property that maps A014580(n) to A000040(n). Differs from the former for the first time at n=32, where A091203(32)=32, while a(32)=512. Differs from the latter for the first time at n=48, where A106445(48)=48, while a(48)=768.

Examples

			a(5) = 9, as 5 encodes the GF(2)[X] polynomial x^2+1, which is the square of the second irreducible GF(2)[X] polynomial x+1 (encoded as 3) and the square of the second prime is 3^2=9. a(32) = a(A048723(2,5)) = 2^a(5) = 2^9 = 512. a(48) = a(3 X A048723(2,4)) = 3 * 2^(a(4+1)-1) = 3 * 2^(9-1) = 3 * 256 = 768.
		

Crossrefs

Inverse: A106442. a(n) = A075164(A106453(n)).

Formula

a(0)=0, a(1)=1. For irreducible GF(2)[X] polynomials ir_i with index i (i.e. A014580(i)), a(ir_i) = A000040(i) and for composite polynomials n = A048723(ir_i, e_i) X A048723(ir_j, e_j) X A048723(ir_k, e_k) X ..., a(n) = a(ir_i)^a(e_i) * a(ir_j)^(a(1+e_j)-1) * a(ir_k)^(a(1+e_k)-1) * ... = A000040(i)^a(e_i) * A000040(j)^(a(1+e_j)-1) * A000040(k)^(a(1+e_k)-1), where X stands for carryless multiplication of GF(2)[X] polynomials (A048720) and A048723(n, y) raises the n-th GF(2)[X] polynomial to the y:th power, while * is the ordinary multiplication and ^ is the ordinary exponentiation. Here ir_i is the most significant (largest) irreducible polynomial in the factorization of n; its exponent e_i is not incremented before the recursion step, while the exponents of less significant factors e_j, e_k, ... are incremented by one before recursing and the result of the recursion is decremented by one before use.

A075165 Sequence A075166 interpreted as binary numbers and converted to decimal.

Original entry on oeis.org

0, 2, 10, 12, 42, 44, 170, 52, 50, 172, 682, 180, 2730, 684, 178, 56, 10922, 204, 43690, 692, 690, 2732, 174762, 184, 202, 10924, 210, 2740, 699050, 716, 2796202, 212, 2738, 43692, 714, 820, 11184810, 174764, 10930, 696, 44739242, 2764, 178956970
Offset: 1

Views

Author

Antti Karttunen, Sep 13 2002

Keywords

Crossrefs

Permutation of A014486. Same sequence shown in binary: A075166. The binary width of each term / 2 is given by A075167.

Formula

a(n) = A106455(A106442(n)). - Antti Karttunen, May 09 2005

A061775 Number of nodes in rooted tree with Matula-Goebel number n.

Original entry on oeis.org

1, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 5, 5, 6, 5, 6, 6, 6, 6, 6, 7, 6, 7, 6, 6, 7, 6, 6, 7, 6, 7, 7, 6, 6, 7, 7, 6, 7, 6, 7, 8, 7, 7, 7, 7, 8, 7, 7, 6, 8, 8, 7, 7, 7, 6, 8, 7, 7, 8, 7, 8, 8, 6, 7, 8, 8, 7, 8, 7, 7, 9, 7, 8, 8, 7, 8, 9, 7, 7, 8, 8, 7, 8, 8, 7, 9, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 7, 8, 8, 8, 9, 7, 7, 9
Offset: 1

Views

Author

N. J. A. Sloane, Jun 22 2001

Keywords

Comments

Let p(1)=2, ... denote the primes. The label f(T) for a rooted tree T is 1 if T has 1 node, otherwise f(T) = Product p(f(T_i)) where the T_i are the subtrees obtained by deleting the root and the edges adjacent to it. (Cf. A061773 for illustration).
Each n occurs A000081(n) times.

Examples

			a(4) = 3 because the rooted tree corresponding to the Matula-Goebel number 4 is "V", which has one root-node and two leaf-nodes, three in total.
See also the illustrations in A061773.
		

Crossrefs

One more than A196050.
Sum of entries in row n of irregular table A214573.
Number of entries in row n of irregular tables A182907, A206491, A206495 and A212620.
One less than the number of entries in row n of irregular tables A184187, A193401 and A193403.
Cf. A005517 (the position of the first occurrence of n).
Cf. A005518 (the position of the last occurrence of n).
Cf. A091233 (their difference plus one).
Cf. A214572 (Numbers k such that a(k) = 8).

Programs

  • Haskell
    import Data.List (genericIndex)
    a061775 n = genericIndex a061775_list (n - 1)
    a061775_list = 1 : g 2 where
       g x = y : g (x + 1) where
          y = if t > 0 then a061775 t + 1 else a061775 u + a061775 v - 1
              where t = a049084 x; u = a020639 x; v = x `div` u
    -- Reinhard Zumkeller, Sep 03 2013
    
  • Maple
    with(numtheory): a := proc (n) local u, v: u := n-> op(1, factorset(n)): v := n-> n/u(n): if n = 1 then 1 elif isprime(n) then 1+a(pi(n)) else a(u(n))+a(v(n))-1 end if end proc: seq(a(n), n = 1..108); # Emeric Deutsch, Sep 19 2011
  • Mathematica
    a[n_] := Module[{u, v}, u = FactorInteger[#][[1, 1]]&; v = #/u[#]&; If[n == 1, 1, If[PrimeQ[n], 1+a[PrimePi[n]], a[u[n]]+a[v[n]]-1]]]; Table[a[n], {n, 108}] (* Jean-François Alcover, Jan 16 2014, after Emeric Deutsch *)
  • PARI
    A061775(n) = if(1==n, 1, if(isprime(n), 1+A061775(primepi(n)), {my(pfs,t,i); pfs=factor(n); pfs[,1]=apply(t->A061775(t),pfs[,1]); (1-bigomega(n)) + sum(i=1, omega(n), pfs[i,1]*pfs[i,2])}));
    for(n=1, 10000, write("b061775.txt", n, " ", A061775(n)));
    \\ Antti Karttunen, Aug 16 2014
    
  • Python
    from functools import lru_cache
    from sympy import isprime, factorint, primepi
    @lru_cache(maxsize=None)
    def A061775(n):
        if n == 1: return 1
        if isprime(n): return 1+A061775(primepi(n))
        return 1+sum(e*(A061775(p)-1) for p, e in factorint(n).items()) # Chai Wah Wu, Mar 19 2022

Formula

a(1) = 1; if n = p_t (= the t-th prime), then a(n) = 1+a(t); if n = uv (u,v>=2), then a(n) = a(u)+a(v)-1.
a(n) = A091238(A091204(n)). - Antti Karttunen, Jan 2004
a(n) = A196050(n)+1. - Antti Karttunen, Aug 16 2014

Extensions

More terms from David W. Wilson, Jun 25 2001
Extended by Emeric Deutsch, Sep 19 2011

A106456 Natural numbers mapped to Dyck path encodings of the rooted plane trees obtained by recursing on the exponents of the GF(2)[X] factorization of n.

Original entry on oeis.org

0, 10, 1010, 1100, 110010, 101100, 101010, 110100, 10110010, 11001100, 10101010, 10110100, 1010101010, 10101100, 11010010, 111000, 11100010, 1011001100, 101010101010, 1100110100, 11001010, 1010101100, 101010110010
Offset: 1

Views

Author

Antti Karttunen, May 09 2005

Keywords

Comments

Note that we recurse on the exponent + 1 for all other irreducible polynomials except the largest one in the GF(2)[X] factorization. Thus for 6 = A048723(3,1) X A048723(2,1) we construct a tree by joining trees 1 and 2 with a new root node, for 7 = A048723(7,1) X A048723(3,0) X A048723(2,0) we join three 1-trees (single leaves) with a new root node, for 8 = A048273(2,3) we add a single edge below tree 3 and for 9 = A048723(7,1) X A048723(3,1) X A048273(2,0) we connect the trees 1 and 2 and 1 with a new root node.

Examples

			The rooted plane trees encoded here are:
.....................o....o..........o.........o...o....o.....
.....................|....|..........|..........\./.....|.....
.......o....o...o....o....o...o..o...o..o.o.o....o....o.o.o...
.......|.....\./.....|.....\./....\./....\|/.....|.....\|/....
*......*......*......*......*......*......*......*......*.....
1......2......3......4......5......6......7......8......9.....
		

Crossrefs

a(n) = A007088(A106455(n)) = A075166(A106443(n)). GF(2)[X]-analog of A075166. Permutation of A063171. Same sequence shown in decimal: A106455. The digital length of each term / 2 (the number of o-nodes in the corresponding trees) is given by A106457. Cf. A106451-A106454.

A075163 Position of A075165(n) in A014486 plus one.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 10, 8, 7, 11, 24, 13, 66, 25, 12, 9, 198, 16, 627, 27, 26, 67, 2057, 14, 15, 199, 17, 69, 6919, 30, 23715, 18, 68, 628, 29, 41, 82501, 2058, 200, 28, 290513, 72, 1033413, 201, 31, 6920, 3707853, 32, 38, 39, 629, 630, 13402698, 44, 71, 70, 2059
Offset: 1

Views

Author

Antti Karttunen, Sep 13 2002

Keywords

Comments

See A075166.

Crossrefs

Inverse of A075164. a(n) = A075161(n-1)+1.

Formula

a(n) = A106453(A106442(n)). - Antti Karttunen, May 09 2005

A075161 Position of A075165(n+1) in A014486.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 9, 7, 6, 10, 23, 12, 65, 24, 11, 8, 197, 15, 626, 26, 25, 66, 2056, 13, 14, 198, 16, 68, 6918, 29, 23714, 17, 67, 627, 28, 40, 82500, 2057, 199, 27, 290512, 71, 1033412, 200, 30, 6919, 3707852, 31, 37, 38, 628, 629, 13402697, 43, 70, 69, 2058
Offset: 0

Views

Author

Antti Karttunen, Sep 13 2002

Keywords

Comments

See A075166.

Crossrefs

Inverse of A075162. a(n) = A075163(n+1)-1. Cf. A075168.

A075171 Nonnegative integers mapped to Dyck path encodings of the rooted plane trees obtained by recursing on the run lengths of the binary expansion of n.

Original entry on oeis.org

0, 10, 1010, 1100, 101100, 101010, 110010, 110100, 10110100, 10110010, 10101010, 10101100, 11001100, 11001010, 11010010, 111000, 10111000, 1011010010, 1011001010, 1011001100, 1010101100, 1010101010, 1010110010, 1010110100
Offset: 0

Views

Author

Antti Karttunen, Sep 13 2002

Keywords

Examples

			The rooted plane trees encoded here are:
.....................o........o.........o......o...o...
.....................|........|.........|.......\./....
.......o....o...o....o....o...o..o.o.o..o...o....o.....
.......|.....\./.....|.....\./....\|/....\./.....|.....
(AT)......(AT)......(AT)......(AT)......(AT)......(AT)......(AT)......(AT).....
0......1......2......3......4......5......6......7.....
Note that we recurse on the run length - 1, thus for 4 = 100 in binary, we construct a tree by joining trees 0 (= 1-1) and 1 (= 2-1) respectively from left to right. For 5 (101) we construct a tree by joining three copies of tree 0 (a single leaf) with a new root node. For 6 (110) we join trees 1 and 0 to get a mirror image of tree 4. For 7 (111) we just add a new root node below tree 2.
		

Crossrefs

Permutation of A063171. Same sequence shown in decimal: A075170. The digital length of each term / 2 (the number of o-nodes in the corresponding trees) is given by A075172. Cf. A075166, A007088.

A075162 Position of A014486(n) in A075165, minus one.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 8, 7, 15, 6, 9, 14, 11, 23, 24, 17, 26, 31, 63, 80, 511, 255, 65535, 10, 13, 20, 19, 39, 34, 29, 44, 47, 95, 134, 767, 383, 98303, 48, 49, 74, 35, 71, 124, 53, 242, 127, 1023, 728, 32767, 4095, 16777215, 624, 161, 19682, 33554431, 262143, 6560
Offset: 0

Views

Author

Antti Karttunen, Sep 13 2002

Keywords

Comments

See A075166.

Crossrefs

Inverse of A075161. a(n) = A075164(n+1)-1. Cf. A075157, A075169.
Showing 1-10 of 11 results. Next