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.

A003238 Number of rooted trees with n vertices in which vertices at the same level have the same degree.

Original entry on oeis.org

1, 1, 2, 3, 5, 6, 10, 11, 16, 19, 26, 27, 40, 41, 53, 61, 77, 78, 104, 105, 134, 147, 175, 176, 227, 233, 275, 294, 350, 351, 438, 439, 516, 545, 624, 640, 774, 775, 881, 924, 1069, 1070, 1265, 1266, 1444, 1521, 1698, 1699
Offset: 1

Views

Author

Keywords

Comments

Also, number of sequences of positive integers b_1, b_2, ..., b_k such that 1 + b_1*(1 + b_2*(...(1 + b_k) ... )) = n. If you take mu(b_1)*mu(b_2)*...*mu(b_k) for each sequence you get 1's 0's and -1's. Add them up and you get the terms for A007554. - Christian G. Bower, Oct 15 1998
Note that this applies also to planar rooted trees and other similar objects (mountain ranges, parenthesizations) encoded by A014486. - Antti Karttunen, Sep 07 2000
Equals sum of (n-1)-th row terms of triangle A152434. - Gary W. Adamson, Dec 04 2008
Equals the eigensequence of A051731, the inverse binomial transform. - Gary W. Adamson, Dec 26 2008
From Emeric Deutsch, Aug 18 2012: (Start)
The considered rooted trees are called generalized Bethe trees; in the Goldberg-Livshitz reference they are called uniform trees.
Also, a(n) = number of partitions of n-1 in which each part is divisible by the next. Example: a(5)=5 because we have 4, 31, 22, 211, and 1111.
There is a simple bijection between generalized Bethe trees with n+1 vertices and partitions of n in which each part is divisible by the next (the parts are given by the number of edges at the successive levels). We have the correspondences: number of edges --- sum of parts; root degree --- last part; number of leaves --- first part; height --- number of parts. (End)
a(n+1) = a(n) + 1 if and only if n is prime. - Jon Perry, Nov 24 2012
According to the MathOverflow link, log(a(n)) ~ log(4)*log(n)^2, and a more precise asymptotic expansion is similar to that of A018819 and hence A000123, so the conjecture in the Formula section is partly correct. - Andrey Zabolotskiy, Jan 22 2017

Examples

			a(4) = 3 because we have the path P(4), the tree Y, and the star \|/ . - _Emeric Deutsch_, Aug 18 2012
The planted achiral trees with up to 7 nodes are:
 1  -
 1  (-)
 2  (--),     ((-))
 3  (---),    ((--)),      (((-)))
 5  (----),   ((-)(-)),    ((---)),    (((--))),     ((((-))))
 6  (-----),  ((----)),    (((-)(-))), (((---))),    ((((--)))), (((((-)))))
10 (------), ((-)(-)(-)), ((--)(--)), (((-))((-))), ((-----)),  (((----))), ((((-)(-)))), ((((---)))), (((((--))))), ((((((-)))))). - _Gus Wiseman_, Jan 12 2017
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Row sums of A122934 (offset by 1).

Programs

  • Haskell
    a003238 n = a003238_list !! (n-1)
    a003238_list = 1 : f 1 where
       f x = (sum (map a003238 $ a027750_row x)) : f (x + 1)
    -- Reinhard Zumkeller, Dec 20 2014
    
  • JavaScript
    a = new Array();
    for (i = 1; i < 50; i++) a[i] = 1;
    for (i = 3; i < 50; i++) for (j = 2; j < i; j++) if (i % j == 1) a[i] += a[j];
    document.write(a + "
    "); // Jon Perry, Nov 20 2012
  • Maple
    with(numtheory): aa := proc (n) if n = 0 then 1 else add(aa(divisors(n)[i]-1), i = 1 .. tau(n)) end if end proc: a := proc (n) options operator, arrow: aa(n-1) end proc: seq(a(n), n = 1 .. 48); # Emeric Deutsch, Aug 18 2012
    A003238:= proc(n) option remember; uses numtheory; add(A003238(m),m=divisors(n-1)) end proc;
    A003238(1):= 1;
    [seq(A003238(n),n=1..48)]; # Robert Israel, Mar 10 2014
  • Mathematica
    (* b = A068336 *) b[1] = 1; b[n_] := b[n] = 1 + Sum[b[k], {k, Divisors[n-1]}]; a[n_] := b[n]/2; a[1] = 1; Table[ a[n], {n, 1, 48}] (* Jean-François Alcover, Dec 20 2011, after Ralf Stephan *)
    achi[n_]:=If[n===1,1,Total[achi/@Divisors[n-1]]];Array[achi,50] (* Gus Wiseman, Jan 12 2017 *)
  • PARI
    seq(n) = {my(v=vector(n)); v[1]=1; for(i=2, n, v[i]=sumdiv(i-1, d, v[d])); v} \\ Andrew Howroyd, Jun 08 2025

Formula

Shifts one place left under inverse Moebius transform: a(n+1) = Sum_{k|n} a(k).
Conjecture: log(a(n)) is asymptotic to c*log(n)^2 where 0.4 < c < 0.5 - Benoit Cloitre, Apr 13 2004
For n > 1, a(n) = (1/2) * A068336(n) and Sum_{k = 1..n} a(k) = A003318(n). - Ralf Stephan, Mar 27 2004
Generating function P(x) for the sequence with offset 2 obeys P(x) = x^2*(1 + Sum_{n >= 1} P(x^n)/x^n). [Harary & Robinson]. - R. J. Mathar, Sep 28 2011
a(n) = 1 + sum of a(i) such that n == 1 (mod i). - Jon Perry, Nov 20 2012
From Ilya Gutkovskiy, Apr 28 2019: (Start)
G.f.: x * (1 + Sum_{n>=1} a(n)*x^n/(1 - x^n)).
L.g.f.: -log(Product_{n>=1} (1 - x^n)^(a(n)/n)) = Sum_{n>=1} a(n+1)*x^n/n. (End)

Extensions

Description improved by Christian G. Bower, Oct 15 1998

A291442 Matula-Goebel numbers of leaf-balanced trees.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 27, 29, 30, 31, 32, 33, 36, 37, 40, 41, 44, 45, 47, 48, 49, 50, 53, 54, 55, 59, 60, 61, 62, 64, 66, 67, 71, 72, 75, 79, 80, 81, 83, 88, 89, 90, 91, 93, 96, 97, 99, 100, 103, 108
Offset: 1

Views

Author

Gus Wiseman, Aug 23 2017

Keywords

Comments

An unlabeled rooted tree is leaf-balanced if every branch has the same number of leaves and every non-leaf rooted subtree is also leaf-balanced.

Crossrefs

Programs

  • Mathematica
    nn=2000;
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    leafcount[n_]:=If[n===1,1,With[{m=primeMS[n]},If[Length[m]===1,leafcount[First[m]],Total[leafcount/@m]]]];
    balQ[n_]:=Or[n===1,With[{m=primeMS[n]},And[SameQ@@leafcount/@m,And@@balQ/@m]]];
    Select[Range[nn],balQ]

A291441 Matula-Goebel numbers of orderless same-trees with all leaves equal to 1.

Original entry on oeis.org

1, 4, 8, 16, 32, 49, 64, 128, 256, 343, 361, 512, 1024, 2048, 2401, 2809, 4096, 6859, 8192, 12031, 16384, 16807, 17161, 32768, 51529, 65536, 96721, 117649, 130321, 131072, 148877, 262144, 516961, 524288, 637643, 718099, 757907, 823543, 1048576, 2097152, 2248091
Offset: 1

Views

Author

Gus Wiseman, Aug 23 2017

Keywords

Comments

See A289078 for the definition of orderless same-tree.

Examples

			a(20)=12031 corresponds to the following same-tree: {{1,1,1,1},{{1,1},{1,1}}}.
		

Crossrefs

Programs

  • Mathematica
    nn=200000;
    primeMS[n_]:=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    leafcount[n_]:=If[n===1,1,With[{m=primeMS[n]},If[Length[m]===1,leafcount[First[m]],Total[leafcount/@m]]]];
    sameQ[n_]:=Or[n===1,With[{m=primeMS[n]},And[Length[m]>1,SameQ@@leafcount/@m,And@@sameQ/@m]]];
    Select[Range[nn],sameQ]

Extensions

More terms from Jinyuan Wang, Jun 21 2020

A245824 Triangle read by rows: row n>=1 contains in increasing order the Matula numbers of the rooted binary trees with n leaves.

Original entry on oeis.org

1, 4, 14, 49, 86, 301, 454, 886, 1589, 1849, 3101, 3986, 6418, 13766, 9761, 13951, 19049, 22463, 26798, 31754, 48181, 57026, 75266, 128074, 298154, 51529, 85699, 93793, 100561, 111139, 137987, 196249, 199591, 203878, 263431, 295969
Offset: 1

Views

Author

Emeric Deutsch, Aug 02 2014

Keywords

Comments

The Matula-Goebel number of a rooted tree can be defined in the following recursive manner: to the one-vertex tree there corresponds the number 1; to a tree T with root degree 1 there corresponds the t-th prime number, where t is the Matula-Goebel number of the tree obtained from T by deleting the edge emanating from the root; to a tree T with root degree m>=2 there corresponds the product of the Matula-Goebel numbers of the m branches of T.
Row n contains A001190(n) entries (the Wedderburn-Etherington numbers).

Examples

			Row 2 is: 4 (the Matula number of the rooted tree V)
Triangle starts:
1;
4;
14;
49, 86;
301, 454, 886;
1589, 1849, 3101, 3986, 6418, 13766;
		

Crossrefs

Cf. A000081, A001190, A007097, A061773, A111299 (the ordered sequence of all numbers appearing in this sequence), A280994.

Programs

  • Mathematica
    nn=9;
    allbin[n_]:=allbin[n]=If[n===1,{{}},Join@@Function[c,Union[Sort/@Tuples[allbin/@c]]]/@Select[IntegerPartitions[n-1],Length[#]===2&]];
    MGNumber[{}]:=1;MGNumber[x:{}]:=Times@@Prime/@MGNumber/@x;
    Table[Sort[MGNumber/@allbin[n]],{n,1,2nn,2}] (* Gus Wiseman, Aug 28 2017 *)

Formula

Let H[n] denote the set of binary rooted trees with n leaves or, with some abuse, the set of their Matula numbers (for example, H[1]={1}, H[2]={4}). Each binary rooted tree with n leaves is obtained by identifying the roots of an "elevated" tree from H[k] and of an "elevated" tree from H[n-k] (k=1,..., floor(n/2)). The Maple program is based on this. It makes use of the fact that the Matula number of the "elevation" of a rooted tree with Matula number q has Matula number equal to the q-th prime. The shown program determines H[m] for m=3...9 but shows only H[9].

Extensions

Ordering of terms corrected by Gus Wiseman, Aug 29 2017

A280996 Prime Matula-Goebel numbers of generalized Bethe trees.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 19, 23, 31, 53, 59, 67, 83, 97, 103, 127, 131, 227, 241, 277, 311, 331, 419, 431, 509, 563, 661, 691, 709, 719, 739, 1433, 1523, 1543, 1619, 1787, 1879, 2063, 2221, 2309, 2437, 2897, 3001, 3637, 3671, 3803, 4091, 4637, 4943, 5189, 5381
Offset: 1

Views

Author

Gus Wiseman, Jan 12 2017

Keywords

Comments

Also prime numbers p whose index pi(p) is the Matula-Goebel number of a planted achiral tree.
An alternative definition: prime(n) is in the sequence iff n is a perfect power of a prime number already in the sequence.

Examples

			a(n) = prime(Product_{i in y} a(i)) where y is the n-th partition in the following sequence, which spans all constant partitions: 1,2,11,3,4,111,22,5,1111,6,7,8,33,222,9,11111,44,...
		

Crossrefs

Programs

  • Mathematica
    nn=10000;
    BTQ[n_]:=Or[n===1,MatchQ[PrimePi/@FactorInteger[n][[All,1]],{_?BTQ}]];
    Prime/@Select[Range[PrimePi[nn]],BTQ]

Formula

a(1) = 2; a(n+1) = prime(A214577(n)).
Showing 1-5 of 5 results.