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-5 of 5 results.

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

A215703 A(n,k) is the n-th derivative of f_k at x=1, and f_k is the k-th of all functions that are representable as x^x^...^x with m>=1 x's and parentheses inserted in all possible ways; square array A(n,k), n>=0, k>=1, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 4, 3, 0, 1, 1, 2, 12, 8, 0, 1, 1, 6, 9, 52, 10, 0, 1, 1, 4, 27, 32, 240, 54, 0, 1, 1, 2, 18, 156, 180, 1188, -42, 0, 1, 1, 2, 15, 100, 1110, 954, 6804, 944, 0, 1, 1, 8, 9, 80, 650, 8322, 6524, 38960, -5112, 0, 1, 1, 6, 48, 56, 590, 4908, 70098, 45016, 253296, 47160, 0
Offset: 0

Views

Author

Alois P. Heinz, Aug 21 2012

Keywords

Comments

A000081(m) distinct functions are representable as x^x^...^x with m>=1 x's and parentheses inserted in all possible ways. Some functions are representable in more than one way, the number of valid parenthesizations is A000108(m-1). The f_k are ordered, such that the number m of x's in f_k is a nondecreasing function of k. The exact ordering is defined by the algorithm below.
The list of functions f_1, f_2, ... begins:
| f_k : m : function (tree) : representation(s) : sequence |
+-----+---+------------------+--------------------------+----------+
| f_1 | 1 | x -> x | x | A019590 |
| f_2 | 2 | x -> x^x | x^x | A005727 |
| f_3 | 3 | x -> x^(x*x) | (x^x)^x | A215524 |
| f_4 | 3 | x -> x^(x^x) | x^(x^x) | A179230 |
| f_5 | 4 | x -> x^(x*x*x) | ((x^x)^x)^x | A215704 |
| f_6 | 4 | x -> x^(x^x*x) | (x^x)^(x^x), (x^(x^x))^x | A215522 |
| f_7 | 4 | x -> x^(x^(x*x)) | x^((x^x)^x) | A215705 |
| f_8 | 4 | x -> x^(x^(x^x)) | x^(x^(x^x)) | A179405 |

Examples

			Square array A(n,k) begins:
  1,   1,    1,    1,     1,     1,     1,     1, ...
  1,   1,    1,    1,     1,     1,     1,     1, ...
  0,   2,    4,    2,     6,     4,     2,     2, ...
  0,   3,   12,    9,    27,    18,    15,     9, ...
  0,   8,   52,   32,   156,   100,    80,    56, ...
  0,  10,  240,  180,  1110,   650,   590,   360, ...
  0,  54, 1188,  954,  8322,  4908,  5034,  2934, ...
  0, -42, 6804, 6524, 70098, 41090, 47110, 26054, ...
		

Crossrefs

Programs

  • Maple
    T:= proc(n) T(n):=`if`(n=1, [x], map(h-> x^h, g(n-1$2))) end:
    g:= proc(n, i) option remember; `if`(i=1, [x^n], [seq(seq(
          seq(mul(T(i)[w[t]-t+1], t=1..j)*v, v=g(n-i*j, i-1)), w=
          combinat[choose]([$1..nops(T(i))+j-1], j)), j=0..n/i)])
        end:
    f:= proc() local i, l; i, l:= 0, []; proc(n) while n>
          nops(l) do i:= i+1; l:= [l[], T(i)[]] od; l[n] end
        end():
    A:= (n, k)-> n!*coeff(series(subs(x=x+1, f(k)), x, n+1), x, n):
    seq(seq(A(n, 1+d-n), n=0..d), d=0..12);
  • Mathematica
    T[n_] := If[n == 1, {x}, Map[x^#&, g[n - 1, n - 1]]];
    g[n_, i_] := g[n, i] = If[i == 1, {x^n}, Flatten @ Table[ Table[ Table[ Product[T[i][[w[[t]] - t + 1]], {t, 1, j}]*v, {v, g[n - i*j, i - 1]}], {w, Subsets[ Range[ Length[T[i]] + j - 1], {j}]}], {j, 0, n/i}]];
    f[n_] := Module[{i = 0, l = {}}, While[n > Length[l], i++; l = Join[l, T[i]]]; l[[n]]];
    A[n_, k_] := n! * SeriesCoefficient[f[k] /. x -> x+1, {x, 0, n}];
    Table[Table[A[n, 1+d-n], {n, 0, d}], {d, 0, 12}] // Flatten (* Jean-François Alcover, Nov 08 2019, after Alois P. Heinz *)

A214571 Irregular triangle read by rows: T(n,k) is the number of ordered trees having n vertices and isomorphic (as rooted trees) to k ordered trees (n >= 1, k >= 1).

Original entry on oeis.org

1, 1, 2, 3, 2, 5, 6, 3, 6, 16, 12, 8, 10, 34, 21, 32, 5, 30, 11, 68, 48, 100, 15, 108, 0, 24, 9, 10, 0, 36, 16, 126, 81, 260, 30, 336, 7, 128, 45, 40, 0, 264, 0, 0, 15, 0, 0, 18, 0, 40, 0, 0, 0, 24, 19, 222, 141, 616, 60, 828, 21, 520, 117, 130, 0, 1140, 0, 0, 45, 80, 0, 234, 0, 160, 21, 0, 0, 312, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0, 0, 36, 0, 0, 0, 40, 26, 372, 219, 1392, 90, 1914, 42, 1664, 315, 320, 0, 3696, 0, 28, 195, 544, 0, 1044, 0, 580, 21, 0, 0, 2112, 0, 0, 27, 28, 0, 480, 0, 0, 0, 0, 35, 648, 0, 0, 0, 320, 0, 84, 0, 0, 0, 0, 0, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360
Offset: 1

Views

Author

Emeric Deutsch, Jul 28 2012

Keywords

Comments

Row n contains A214570(n) entries.
T(n,1) = A003238(n).
Sum_{k=1..n} T(n,k) = A000108(n) (the Catalan numbers).
Sum_{k=1..n} T(n,k)/k = A000081(n) (the number of rooted trees with n vertices).
T(n,k) = k*A214569(n,k).
T(n,k) is also the number of function representations as x^x^...^x with n x's and parentheses inserted in all possible ways that are equivalent to (describe the same function as) k-1 other representations. T(4,2) = 2: (x^x)^(x^x), (x^(x^x))^x; T(5,3) = 3: ((x^x)^x)^(x^x), ((x^x)^(x^x))^x, ((x^(x^x))^x)^x. - Alois P. Heinz, Aug 31 2012

Examples

			Row 4 is 3,2: among the five ordered trees with 4 vertices the path tree P_4, the star tree K_{1,3}, and the tree in the shape of Y are isomorphic only to themselves, while A - B - C - D with root at B and A - B - C - D with root at C are isomorphic among themselves.
Triangle starts:
   1;
   1;
   2;
   3,   2;
   5,   6,   3;
   6,  16,  12,   8;
  10,  34,  21,  32,   5,  30;
  11,  68,  48, 100,  15, 108,   0,  24,   9,  10,   0,  36;
		

Crossrefs

Programs

  • Maple
    F:= proc(n) option remember; `if`(n=1, [x+1],
          [seq(seq(seq(f^g, g=F(n-i)), f=F(i)), i=1..n-1)])
        end:
    T:= proc(n) option remember; local i, l, p;
          l:= map(f->coeff(series(f, x, n+1), x, n), F(n)):
          p:= proc() 0 end: forget(p);
          for i in l do p(i):= p(i)+1 od:
          l:= map(p, l); forget(p);
          for i in l do p(i):= p(i)+1 od:
          seq(p(i), i=1..max(l[]))
        end:
    seq(T(n), n=1..10);  # Alois P. Heinz, Aug 31 2012
  • Mathematica
    F[n_] := F[n] = If[n == 1, {x+1}, Flatten[Table[Table[Table[f^g, {g, F[n-i]}], {f, F[i]}], {i, 1, n-1}]]]; T[n_] := T[n] = Module[{i, l, p}, l = Map[Function[ {f}, Coefficient[Series[f, {x, 0, n+1}], x, n]], F[n]]; Clear[p]; p[] = 0; Do[ p[i] = p[i]+1 , {i, l}]; l = Map[p, l]; Clear[p]; p[] = 0; Do[p[i] = p[i]+1, {i, l}]; Table[p[i], {i, 1, Max[l]}]]; Table[T[n], {n, 1, 10}] // Flatten (* Jean-François Alcover, May 28 2015, after Alois P. Heinz *)

Formula

No formula available. Entries have been obtained from T(n,k)= k*A214569(n,k).

A217052 a(n) = 3*a(n-1) + 24*a(n-2) + a(n-3), with a(0)=a(1)=1, and a(2)=19.

Original entry on oeis.org

1, 1, 19, 82, 703, 4096, 29242, 186733, 1266103, 8309143, 55500634, 367187437, 2441886670, 16193659132, 107553444913, 713750040577, 4738726458775, 31453733795086, 208804386436435, 1386041496850144, 9200883498819958, 61076450807299765, 405436597890428431
Offset: 0

Views

Author

Roman Witula, Sep 25 2012

Keywords

Comments

The Ramanujan type sequence number 10 for the argument 2*Pi/9 defined by the relation a(n) = ((1/3 - c(1))^n + (1/3 - c(2))^n + (1/3 - c(4))^n)*3^(n-1), where c(j) := 2*cos(2*Pi*j/9). We note that c(4) = -cos(Pi/9). The conjugate with a(n) are sequences A217053 and A217069.
For more informations about connections a(n) with these two sequences - see comments in A217053.
The 3-valuation of the sequence a(n) is equal to (1).

Examples

			We have a(4)=37*a(2) and a(5) = 2^(12), which implies (1/3 - c(1))^4 + (1/3 - c(2))^4 + (1/3 - c(4))^4 = (37/9)*((1/3 - c(1))^2 + (1/3 - c(2))^2 + (1/3 - c(4))^2) = (37/27)*19 = 703/27, (1/3 - c(1))^5 + (1/3 - c(2))^5 + (1/3 - c(4))^5 = (8/3)^4. Moreover we have a(10) = 676837*a(3).
		

References

  • Roman Witula, E. Hetmaniok, and D. Slota, Sums of the powers of any order roots taken from the roots of a given polynomial, Proceedings of the 15th International Conference on Fibonacci Numbers and Their Applications, Eger, Hungary, 2012, in review.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3,24,1}, {1,1,19}, 30]
  • PARI
    Vec((1-2*x-8*x^2)/(1-3*x-24*x^2-x^3)+O(x^99)) \\ Charles R Greathouse IV, Oct 01 2012

Formula

G.f.: (1-2*x-8*x^2)/(1-3*x-24*x^2-x^3).

A214570 a(n) = Max(c(t)), where c(t) is the number of ordered trees isomorphic - as rooted trees - to the rooted tree t and the maximum is taken over all rooted trees with n vertices.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 12, 24, 40, 60, 120, 240, 420, 840, 1680
Offset: 1

Views

Author

Emeric Deutsch, Jul 28 2012

Keywords

Comments

a(n) is also the size of the largest equivalence class of function representations as x^x^...^x with n x's and parentheses inserted in all possible ways. a(4) = 2: (x^x)^(x^x) == (x^(x^x))^x; a(5) = 3: ((x^x)^x)^(x^x) == ((x^x)^(x^x))^x == ((x^(x^x))^x)^x. - Alois P. Heinz, Aug 31 2012

Examples

			a(4) = 2 because among the four rooted trees with 4 vertices the path tree P_4, the star tree K_{1,3}, and the tree in the shape of Y are isomorphic only to themselves, while A - B - C - D with root at B is isomorphic to itself and to A - B - C - D with root at C.
		

Crossrefs

Programs

  • Maple
    F:= proc(n) option remember; `if`(n=1, [x+1],
          [seq(seq(seq(f^g, g=F(n-i)), f=F(i)), i=1..n-1)])
        end:
    a:= proc(n) option remember; local i, l, m, p; m:=0;
          l:= map(f->coeff(series(f, x, n+1), x, n), F(n)):
          p:= proc() 0 end: forget(p);
          for i in l do p(i):= p(i)+1; m:= max(m, p(i))
          od: m
        end:
    seq(a(n), n=1..10);  # Alois P. Heinz, Aug 31 2012
  • Mathematica
    F[n_] := F[n] = If[n == 1, {x+1}, Flatten[Table[Table[Table[f^g, {g, F[n-i]}], {f, F[i]}], {i, 1, n-1}]]]; a[n_] := a[n] = Module[{i, l, m, p}, m = 0; l = Map[ Function[ {f}, Coefficient[Series[f, {x, 0, n+1}], x, n]], F[n]]; Clear[p]; p[] = 0; Do[p[i] = p[i]+1; m = Max[m, p[i]], {i, l}]; m]; Table[a[n], {n, 1, 10}] (* _Jean-François Alcover, May 28 2015, after Alois P. Heinz *)

Formula

No formula available, except a(n)=number of entries in row n of A214569.

Extensions

a(12)-a(16) from Alois P. Heinz, Sep 06 2012
Showing 1-5 of 5 results.