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 16 results. Next

A269800 Convolution of A000107 and A027852.

Original entry on oeis.org

0, 0, 1, 3, 10, 30, 91, 268, 790, 2308, 6737, 19609, 57044, 165796, 481823, 1400028, 4068577, 11825459, 34380152, 99981942, 290854486, 846397344, 2463892294, 7174933683, 20900764811, 60904875999, 177535250815, 517673673674, 1509950058629, 4405547856394, 12857716906991
Offset: 0

Views

Author

R. J. Mathar, Mar 05 2016

Keywords

Comments

This counts the arrangements of n nested circles in the plane where one pair of circles touches. a(2)=1 because the (only) pair must touch. a(3)=3 because either the third circle circumscribes the touching pair or is inside one of the touching circles or is entirely separated from the touching pair.

Crossrefs

Programs

  • Mathematica
    b[0] = 0; b[1] = 1; b[n_] := b[n] =Sum[Sum[d b[d], {d, Divisors[j]}] b[n - j], {j, 1, n - 1}]/(n - 1);
    a7[n_] := a7[n] = b[n] + Sum[ a7[n - i] b[i], {i, 1, n - 1}];
    c[n_] := c[n] = If[n <= 1, n, (Sum[Sum[d c[d], {d, Divisors[j]}] c[n - j], {j, 1, n - 1}])/(n - 1)];
    a52[n_] := (Sum[c[i] c[n-i], {i, 0, n}] + If[Mod[n, 2] == 0, c[n/2], 0])/2;
    a[n_] := Sum[a7[k] a52[n - k + 1], {k, 0, n + 1}];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Dec 16 2018, after Alois P. Heinz in A000107 and A027852 *)

A340310 Decimal expansion of a constant related to the asymptotics of A000107.

Original entry on oeis.org

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

Views

Author

Vaclav Kotesovec, Jan 04 2021

Keywords

Examples

			0.36177825839002121979268862473119245527193122181016821417842109878342781...
		

Crossrefs

Cf. A000107.

Formula

Equals lim_{n->infinity} A000107(n) * sqrt(n) / A051491^n.

A000312 a(n) = n^n; number of labeled mappings from n points to themselves (endofunctions).

Original entry on oeis.org

1, 1, 4, 27, 256, 3125, 46656, 823543, 16777216, 387420489, 10000000000, 285311670611, 8916100448256, 302875106592253, 11112006825558016, 437893890380859375, 18446744073709551616, 827240261886336764177, 39346408075296537575424, 1978419655660313589123979
Offset: 0

Views

Author

Keywords

Comments

Also number of labeled pointed rooted trees (or vertebrates) on n nodes.
For n >= 1 a(n) is also the number of n X n (0,1) matrices in which each row contains exactly one entry equal to 1. - Avi Peretz (njk(AT)netvision.net.il), Apr 21 2001
Also the number of labeled rooted trees on (n+1) nodes such that the root is lower than its children. Also the number of alternating labeled rooted ordered trees on (n+1) nodes such that the root is lower than its children. - Cedric Chauve (chauve(AT)lacim.uqam.ca), Mar 27 2002
With p(n) = the number of integer partitions of n, p(i) = the number of parts of the i-th partition of n, d(i) = the number of different parts of the i-th partition of n, p(j, i) = the j-th part of the i-th partition of n, m(i, j) = multiplicity of the j-th part of the i-th partition of n, one has: a(n) = Sum_{i=1..p(n)} (n!/(Product_{j=1..p(i)} p(i, j)!)) * ((n!/(n - p(i)))!/(Product_{j=1..d(i)} m(i, j)!)). - Thomas Wieder, May 18 2005
All rational solutions to the equation x^y = y^x, with x < y, are given by x = A000169(n+1)/A000312(n), y = A000312(n+1)/A007778(n), where n = 1, 2, 3, ... . - Nick Hobson, Nov 30 2006
a(n) is the total number of leaves in all (n+1)^(n-1) trees on {0,1,2,...,n} rooted at 0. For example, with edges directed away from the root, the trees on {0,1,2} are {0->1,0->2},{0->1->2},{0->2->1} and contain a total of a(2)=4 leaves. - David Callan, Feb 01 2007
Limit_{n->infinity} A000169(n+1)/a(n) = exp(1). Convergence is slow, e.g., it takes n > 74 to get one decimal place correct and n > 163 to get two of them. - Alonso del Arte, Jun 20 2011
Also smallest k such that binomial(k, n) is divisible by n^(n-1), n > 0. - Michel Lagneau, Jul 29 2013
For n >= 2 a(n) is represented in base n as "one followed by n zeros". - R. J. Cano, Aug 22 2014
Number of length-n words over the alphabet of n letters. - Joerg Arndt, May 15 2015
Number of prime parking functions of length n+1. - Rui Duarte, Jul 27 2015
The probability density functions p(x, m=q, n=q, mu=1) = A000312(q)*E(x, q, q) and p(x, m=q, n=1, mu=q) = (A000312(q)/A000142(q-1))*x^(q-1)*E(x, q, 1), with q >= 1, lead to this sequence, see A163931, A274181 and A008276. - Johannes W. Meijer, Jun 17 2016
Satisfies Benford's law [Miller, 2015]. - N. J. A. Sloane, Feb 12 2017
A signed version of this sequence apart from the first term (1, -4, -27, 256, 3125, -46656, ...), has the following property: for every prime p == 1 (mod 2n), (-1)^(n(n-1)/2)*n^n = A057077(n)*a(n) is always a 2n-th power residue modulo p. - Jianing Song, Sep 05 2018
From Juhani Heino, May 07 2019: (Start)
n^n is both Sum_{i=0..n} binomial(n,i)*(n-1)^(n-i)
and Sum_{i=0..n} binomial(n,i)*(n-1)^(n-i)*i.
The former is the familiar binomial distribution of a throw of n n-sided dice, according to how many times a required side appears, 0 to n. The latter is the same but each term is multiplied by its amount. This means that if the bank pays the player 1 token for each die that has the chosen side, it is always a fair game if the player pays 1 token to enter - neither bank nor player wins on average.
Examples:
2-sided dice (2 coins): 4 = 1 + 2 + 1 = 1*0 + 2*1 + 1*2 (0 omitted from now on);
3-sided dice (3 long triangular prisms): 27 = 8 + 12 + 6 + 1 = 12*1 + 6*2 + 1*3;
4-sided dice (4 long square prisms or 4 tetrahedrons): 256 = 81 + 108 + 54 + 12 + 1 = 108*1 + 54*2 + 12*3 + 1*4;
5-sided dice (5 long pentagonal prisms): 3125 = 1024 + 1280 + 640 + 160 + 20 + 1 = 1280*1 + 640*2 + 160*3 + 20*4 + 1*5;
6-sided dice (6 cubes): 46656 = 15625 + 18750 + 9375 + 2500 + 375 + 30 + 1 = 18750*1 + 9375*2 + 2500*3 + 375*4 + 30*5 + 1*6.
(End)
For each n >= 1 there is a graph on a(n) vertices whose largest independent set has size n and whose independent set sequence is constant (specifically, for each k=1,2,...,n, the graph has n^n independent sets of size k). There is no graph of smaller order with this property (Ball et al. 2019). - David Galvin, Jun 13 2019
For n >= 2 and 1 <= k <= n, a(n)*(n + 1)/4 + a(n)*(k - 1)*(n + 1 - k)/2*n is equal to the sum over all words w = w(1)...w(n) of length n over the alphabet {1, 2, ..., n} of the following quantity: Sum_{i=1..w(k)} w(i). Inspired by Problem 12432 in the AMM (see links). - Sela Fried, Dec 10 2023
Also, dimension of the unique cohomology group of the smallest interval containing the poset of partitions decorated by Perm, i.e. the poset of pointed partitions. - Bérénice Delcroix-Oger, Jun 25 2025

Examples

			G.f. = 1 + x + 4*x^2 + 27*x^3 + 256*x^4 + 3125*x^5 + 46656*x^6 + 823543*x^7 + ...
		

References

  • F. Bergeron, G. Labelle and P. Leroux, Combinatorial Species and Tree-Like Structures, Cambridge, 1998, pp. 62, 63, 87.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 173, #39.
  • A. P. Prudnikov, Yu. A. Brychkov and O.I. Marichev, "Integrals and Series", Volume 1: "Elementary Functions", Chapter 4: "Finite Sums", New York, Gordon and Breach Science Publishers, 1986-1992, Eq. (4.2.2.37)
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

First column of triangle A055858. Row sums of A066324.
Cf. A001923 (partial sums), A002109 (partial products), A007781 (first differences), A066588 (sum of digits).
Cf. A056665, A081721, A130293, A168658, A275549-A275558 (various classes of endofunctions).

Programs

  • Haskell
    a000312 n = n ^ n
    a000312_list = zipWith (^) [0..] [0..]  -- Reinhard Zumkeller, Jul 07 2012
    
  • Maple
    A000312 := n->n^n: seq(A000312(n), n=0..17);
  • Mathematica
    Array[ #^# &, 16] (* Vladimir Joseph Stephan Orlovsky, May 01 2008 *)
    Table[Sum[StirlingS2[n, i] i! Binomial[n, i], {i, 0, n}], {n, 0, 20}] (* Geoffrey Critzer, Mar 17 2009 *)
    a[ n_] := If[ n < 1, Boole[n == 0], n^n]; (* Michael Somos, May 24 2014 *)
    a[ n_] := If[ n < 0, 0, n! SeriesCoefficient[ 1 / (1 + LambertW[-x]), {x, 0, n}]]; (* Michael Somos, May 24 2014 *)
    a[ n_] := If[n < 0, 0, n! SeriesCoefficient[ Nest[ 1 / (1 - x / (1 - Integrate[#, x])) &, 1 + O[x], n], {x, 0, n}]]; (* Michael Somos, May 24 2014 *)
    a[ n_] := If[ n < 0, 0, With[{m = n + 1}, m! SeriesCoefficient[ InverseSeries[ Series[ (x - 1) Log[1 - x], {x, 0, m}]], m]]]; (* Michael Somos, May 24 2014 *)
  • Maxima
    A000312[n]:=if n=0 then 1 else n^n$
    makelist(A000312[n],n,0,30); /* Martin Ettl, Oct 29 2012 */
    
  • PARI
    {a(n) = n^n};
    
  • PARI
    is(n)=my(b,k=ispower(n,,&b));if(k,for(e=1,valuation(k,b), if(k/b^e == e, return(1)))); n==1 \\ Charles R Greathouse IV, Jan 14 2013
    
  • PARI
    {a(n) = my(A = 1 + O(x)); if( n<0, 0, for(k=1, n, A = 1 / (1 - x / (1 - intformal( A)))); n! * polcoeff( A, n))}; /* Michael Somos, May 24 2014 */
    
  • Python
    def A000312(n): return n**n # Chai Wah Wu, Nov 07 2022

Formula

a(n-1) = -Sum_{i=1..n} (-1)^i*i*n^(n-1-i)*binomial(n, i). - Yong Kong (ykong(AT)curagen.com), Dec 28 2000
E.g.f.: 1/(1 + W(-x)), W(x) = principal branch of Lambert's function.
a(n) = Sum_{k>=0} binomial(n, k)*Stirling2(n, k)*k! = Sum_{k>=0} A008279(n,k)*A048993(n,k) = Sum_{k>=0} A019538(n,k)*A007318(n,k). - Philippe Deléham, Dec 14 2003
E.g.f.: 1/(1 - T), where T = T(x) is Euler's tree function (see A000169).
a(n) = A000169(n+1)*A128433(n+1,1)/A128434(n+1,1). - Reinhard Zumkeller, Mar 03 2007
Comment on power series with denominators a(n): Let f(x) = 1 + Sum_{n>=1} x^n/n^n. Then as x -> infinity, f(x) ~ exp(x/e)*sqrt(2*Pi*x/e). - Philippe Flajolet, Sep 11 2008
E.g.f.: 1 - exp(W(-x)) with an offset of 1 where W(x) = principal branch of Lambert's function. - Vladimir Kruchinin, Sep 15 2010
a(n) = (n-1)*a(n-1) + Sum_{i=1..n} binomial(n, i)*a(i-1)*a(n-i). - Vladimir Shevelev, Sep 30 2010
With an offset of 1, the e.g.f. is the compositional inverse ((x - 1)*log(1 - x))^(-1) = x + x^2/2! + 4*x^3/3! + 27*x^4/4! + .... - Peter Bala, Dec 09 2011
a(n) = denominator((1 + 1/n)^n) for n > 0. - Jean-François Alcover, Jan 14 2013
a(n) = A089072(n,n) for n > 0. - Reinhard Zumkeller, Mar 18 2013
a(n) = (n-1)^(n-1)*(2*n) + Sum_{i=1..n-2} binomial(n, i)*(i^i*(n-i-1)^(n-i-1)), n > 1, a(0) = 1, a(1) = 1. - Vladimir Kruchinin, Nov 28 2014
log(a(n)) = lim_{k->infinity} k*(n^(1+1/k) - n). - Richard R. Forberg, Feb 04 2015
From Ilya Gutkovskiy, Jun 18 2016: (Start)
Sum_{n>=1} 1/a(n) = 1.291285997... = A073009.
Sum_{n>=1} 1/a(n)^2 = 1.063887103... = A086648.
Sum_{n>=1} n!/a(n) = 1.879853862... = A094082. (End)
A000169(n+1)/a(n) -> e, as n -> oo. - Daniel Suteu, Jul 23 2016
a(n) = n!*Product_{k=1..n} binomial(n, k)/Product_{k=1..n-1} binomial(n-1, k) = n!*A001142(n)/A001142(n-1). - Tony Foster III, Sep 05 2018
a(n-1) = abs(p_n(2-n)), for n > 2, the single local extremum of the n-th row polynomial of A055137 with Bagula's sign convention. - Tom Copeland, Nov 15 2019
Sum_{n>=1} (-1)^(n+1)/a(n) = A083648. - Amiram Eldar, Jun 25 2021
Limit_{n->oo} (a(n+1)/a(n) - a(n)/a(n-1)) = e (see Brothers/Knox link). - Harlan J. Brothers, Oct 24 2021
Conjecture: a(n) = Sum_{i=0..n} A048994(n, i) * A048993(n+i, n) for n >= 0; proved by Mike Earnest, see link at A354797. - Werner Schulte, Jun 19 2022

A339067 Triangle read by rows: T(n,k) is the number of linear forests with n nodes and k rooted trees.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 4, 5, 3, 1, 9, 12, 9, 4, 1, 20, 30, 25, 14, 5, 1, 48, 74, 69, 44, 20, 6, 1, 115, 188, 186, 133, 70, 27, 7, 1, 286, 478, 503, 388, 230, 104, 35, 8, 1, 719, 1235, 1353, 1116, 721, 369, 147, 44, 9, 1, 1842, 3214, 3651, 3168, 2200, 1236, 560, 200, 54, 10, 1
Offset: 1

Views

Author

Andrew Howroyd, Dec 03 2020

Keywords

Comments

T(n,k) is the number of trees with n nodes rooted at two noninterchangeable nodes at a distance k-1 from each other.
Also the convolution triangle of A000081. - Peter Luschny, Oct 07 2022

Examples

			Triangle begins:
    1;
    1,    1;
    2,    2,    1;
    4,    5,    3,    1;
    9,   12,    9,    4,   1;
   20,   30,   25,   14,   5,   1;
   48,   74,   69,   44,  20,   6,   1;
  115,  188,  186,  133,  70,  27,   7,  1;
  286,  478,  503,  388, 230, 104,  35,  8, 1;
  719, 1235, 1353, 1116, 721, 369, 147, 44, 9, 1;
  ...
		

Crossrefs

Columns 1..6 are A000081, A000106, A000242, A000300, A000343, A000395.
Row sums are A000107.
T(2n-1,n) gives A339440.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<2, n, (add(add(d*b(d),
          d=numtheory[divisors](j))*b(n-j), j=1..n-1))/(n-1))
        end:
    T:= proc(n, k) option remember; `if`(k=1, b(n), (t->
          add(T(j, t)*T(n-j, k-t), j=1..n-1))(iquo(k, 2)))
        end:
    seq(seq(T(n, k), k=1..n), n=1..12);  # Alois P. Heinz, Dec 04 2020
    # Using function PMatrix from A357368. Adds row and column for n, k = 0.
    PMatrix(10, A000081); # Peter Luschny, Oct 07 2022
  • Mathematica
    b[n_] := b[n] = If[n < 2, n, (Sum[Sum[d*b[d], {d, Divisors[j]}]*b[n - j], {j, 1, n - 1}])/(n - 1)];
    T[n_, k_] := T[n, k] = If[k == 1, b[n], With[{t = Quotient[k, 2]}, Sum[T[j, t]*T[n - j, k - t], {j, 1, n - 1}]]];
    Table[Table[T[n, k], {k, 1, n}], {n, 1, 12}] // Flatten (* Jean-François Alcover, Jan 03 2021, after Alois P. Heinz *)
  • PARI
    \\ TreeGf is A000081.
    TreeGf(N) = {my(A=vector(N, j, 1)); for (n=1, N-1, A[n+1] = 1/n * sum(k=1, n, sumdiv(k, d, d*A[d]) * A[n-k+1] ) ); x*Ser(A)}
    ColSeq(n,k)={my(t=TreeGf(max(0,n+1-k))); Vec(t^k, -n)}
    M(n, m=n)=Mat(vector(m, k, ColSeq(n,k)~))
    { my(T=M(12)); for(n=1, #T~, print(T[n,1..n])) }

Formula

G.f. of k-th column: t(x)^k where t(x) is the g.f. of A000081.
Sum_{k=1..n} k * T(n,k) = A038002(n). - Alois P. Heinz, Dec 04 2020

A000243 Number of trees with n nodes, 2 of which are labeled.

Original entry on oeis.org

1, 3, 9, 26, 75, 214, 612, 1747, 4995, 14294, 40967, 117560, 337830, 972027, 2800210, 8075889, 23315775, 67380458, 194901273, 564239262, 1634763697, 4739866803, 13752309730, 39926751310, 115988095896, 337138003197
Offset: 2

Views

Author

Keywords

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 138.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column k=2 of A034799.

Programs

  • Maple
    b:= proc(n) option remember; if n<=1 then n else add(k*b(k)* s(n-1, k), k=1..n-1)/(n-1) fi end: s:= proc(n,k) option remember; add(b(n+1-j*k), j=1..iquo(n,k)) end: B:= proc(n) option remember; add(b(k)*x^k, k=1..n) end: a:= n-> coeff(series(B(n-1)^2/(1-B(n-1)), x=0, n+1), x,n): seq(a(n), n=2..27); # Alois P. Heinz, Aug 21 2008
  • Mathematica
    b[n_] := b[n] = If[ n <= 1 , n, Sum[k*b[k]*s[n - 1, k], {k, 1, n - 1}]/(n - 1) ]; s[n_, k_] := s[n, k] = Sum[ b[n + 1 - j*k], {j, 1, Quotient[n, k]}]; B[n_] := B[n] = Sum[ b[k]*x^k, {k, 1, n}]; a[n_] := Coefficient[ Series[ B[n - 1]^2/(1 - B[n - 1]), {x, 0, n + 1}], x, n]; Table[ a[n], {n, 2, 27}] (* Jean-François Alcover, Jan 25 2012, translated from Maple *)

Formula

a(n) = A000107(n) - A000081(n). - Christian G. Bower, Nov 15 1999
G.f.: A(x) = B(x)^2/(1-B(x)), where B(x) is g.f. for rooted trees with n nodes, cf. A000081. - Vladeta Jovovic, Oct 19 2001
a(n) = A000106(n) + A304068(n). - Brendan McKay, May 05 2018

Extensions

More terms and new description from Christian G. Bower, Nov 15 1999

A008295 Triangle read by rows: T(n,k) is the number of partially labeled rooted trees with n vertices, k of which are labeled, 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 5, 9, 9, 4, 13, 34, 64, 64, 9, 35, 119, 326, 625, 625, 20, 95, 401, 1433, 4016, 7776, 7776, 48, 262, 1316, 5799, 21256, 60387, 117649, 117649, 115, 727, 4247, 22224, 100407, 373895, 1071904, 2097152, 2097152
Offset: 0

Views

Author

Keywords

Comments

T(n, k) where n counts the vertices and 0 <= k <= n counts the labels. - Sean A. Irvine, Mar 22 2018

Examples

			Triangle begins with T(0,0):
n\k 0  1   2    3    4    5    6
0   1
1   1  1
2   1  2   2
3   2  5   9    9
4   4 13  34   64   64
5   9 35 119  326  625  625
6  20 95 401 1433 4016 7776 7776
		

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 134.

Crossrefs

Main diagonal is A000169.
Cf. A034799.

Programs

  • Mathematica
    m = 9; r[_] = 0;
    Do[r[x_] = x Exp[Sum[r[x^k]/k, {k, 1, j}]] + O[x]^j // Normal, {j, 1, m}];
    r[x_, y_] = -ProductLog[(-E^(-r[x])) r[x] - (r[x] y)/E^r[x]];
    (CoefficientList[#, y] Range[0, Exponent[#, y]]!)& /@ CoefficientList[r[x, y] + O[x]^m, x] /. {} -> {1} // Flatten // Quiet (* Jean-François Alcover, Oct 23 2019 *)

Formula

E.g.f.: r(x,y) = T(n,k) * y^k * x^n / k! satisfies r(x,y) * exp(r(x)) = (1+y) * r(x) * exp(r(x,y)) where r(x) is the o.g.f. for A000081. - Sean A. Irvine, Mar 22 2018

Extensions

More terms from Sean A. Irvine, Mar 22 2018
Name edited by Andrew Howroyd, Mar 23 2023

A303833 Birooted trees: number of unlabeled trees with n nodes rooted at 2 indistinguishable roots.

Original entry on oeis.org

0, 1, 2, 6, 15, 43, 116, 329, 918, 2609, 7391, 21099, 60248, 172683, 495509, 1424937, 4102693, 11830006, 34148859, 98686001, 285459772, 826473782, 2394774727, 6944343654, 20151175658, 58513084011, 170007600051, 494230862633
Offset: 1

Views

Author

R. J. Mathar, Brendan McKay, May 01 2018

Keywords

Crossrefs

Subsets of graphs in A303831. Cf. A000243 (distinguishable roots), A000055 (not rooted).
Third column of A294783.

Programs

  • Maple
    a000081 := [1, 1, 2, 4, 9, 20, 48, 115, 286, 719, 1842, 4766, 12486, 32973, 87811, 235381, 634847, 1721159, 4688676, 12826228, 35221832, 97055181, 268282855, 743724984, 2067174645, 5759636510, 16083734329, 45007066269, 126186554308, 354426847597] ;
    g81 := add( op(i,a000081)*x^i,i=1..nops(a000081) ) ;
    g := 0 ;
    nmax := nops(a000081) ;
    for m from 0 to nmax do
        mhalf := floor(m/2) ;
        ghalf := g81^(mhalf+1) ;
        gcyc := (ghalf^2+subs(x=x^2,ghalf))/2 ;
        if type(m,odd) then
            gcyc := gcyc*g81 ;
        end if;
        g := g+gcyc ;
    end do:
    taylor(g,x=0,nmax) ;
    gfun[seriestolist](%) ; # R. J. Mathar, May 01 2018
  • PARI
    TreeGf is A000081 as g.f.
    TreeGf(N) = {my(A=vector(N, j, 1)); for (n=1, N-1, A[n+1] = 1/n * sum(k=1, n, sumdiv(k, d, d*A[d]) * A[n-k+1] ) ); x*Ser(A)}
    seq(n)={my(t=TreeGf(n), t2=subst(t,x,x^2)+O(x*x^n)); Vec((2*t^2-1)/(1-t) + (1+t)/(1-t2), -n)/2} \\ Andrew Howroyd, Dec 04 2020

Formula

G.f.: [g81(x)^2/{1-g81(x)} +(1+g81(x))*g81(x^2)/{1-g81(x^2)}] /2 = [ g243(x) +(1+g81(x))*g107(x^2)]/2, where g81 is the g.f. of A000081, g243 the g.f. of A000243 and g107 the g.f. of A000107. - R. J. Mathar, May 02 2018
a(n) = A027852(n) + A304067(n). - Brendan McKay, May 05 2018
a(n) = A303840(n+2) - A000081(n). - Andrew Howroyd, Dec 04 2020

A214568 Triangle read by rows: T(n,k) is the number of rooted trees t with n vertices yielding k distinct rooted trees with n+1 vertices when a pendant edge is added to a vertex of t (1 <= k <= n).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 2, 0, 1, 2, 3, 3, 0, 1, 1, 6, 6, 6, 0, 1, 3, 7, 11, 14, 12, 0, 1, 1, 11, 16, 29, 32, 25, 0, 1, 3, 11, 26, 46, 72, 75, 52, 0, 1, 2, 16, 27, 79, 122, 182, 177, 113, 0, 1, 3, 18, 42, 101, 217, 336, 457, 420, 247, 0, 1, 1, 20, 47, 149, 303, 621, 911, 1160, 1005, 548
Offset: 1

Views

Author

Emeric Deutsch, Jul 26 2012

Keywords

Comments

Row n contains n entries.
Sum_{k=1..n} T(n,k) = A000081(n) = number of rooted trees with n vertices.
Sum_{k=1..n} k*T(n,k) = A000107(n).
T(n,n) = A004111(n).
T(n,3) = A032741(n-1) = number of proper divisors of n-1; if d is a proper divisor of n-1 (= number of edges), consider d identical rooted trees with (n-1)/d edges, root degree 1, height 2 and identify their roots.
The bivariate g.f. can be computed with eq. (4.2) of Harary-Robinson. - R. J. Mathar, Sep 16 2015

Examples

			Triangle starts:
  1;
  0,  1;
  0,  1,  1;
  0,  1,  1,  2;
  0,  1,  2,  3,  3;
  0,  1,  1,  6,  6,  6;
  0,  1,  3,  7, 11, 14, 12;
  0,  1,  1, 11, 16, 29, 32, 25;
Row 4 is 0,1,1,2 because the four rooted trees with 4 vertices generate 2,3,4,and 4 rooted trees with 5 vertices.
		

Crossrefs

Formula

No formula available. Entries have been obtained by counting (using Maple) the rooted trees (identified by their Matula-Goebel numbers) with the required properties (using A061775 and A214567).
Bivariate g.f. T(x,y) = x * y * Product_{p>=1} Product_{k=1..p} (1 + x^p*y^k / (1-x^p))^(a(p,k)), where a(p,k) is the coefficient of x^p*y^k in T(x,y) [(4.2) from Harari and Robinson]. This allows incremental computation of the rows of the sequence by starting with T(x,y) = x*y (p=1) and increasing p by 1 for each row. - Sean A. Irvine, Oct 10 2017

A246860 Expected value of trace(O)^(2n), where O is a 4 X 4 orthogonal matrix randomly selected according to Haar measure.

Original entry on oeis.org

1, 3, 15, 105, 903, 8778, 92235, 1023165, 11821953, 141061206, 1727926291, 21634600078, 275950576450, 3576315994020, 46995014634435, 625082431593285, 8403885851894445, 114069364107664350, 1561609592248119645, 21543838447412548410, 299299110959202973710
Offset: 1

Views

Author

Nathaniel Johnston, Sep 05 2014

Keywords

Comments

The corresponding sequences for 2 X 2, 3 X 3, and 5 X 5 matrices are A001700, A099251, and A247304.
a(n) is the number of triangulations with middle chord of an 2n+2-gon modulo the cyclic action. So a(n) = A000108(n)^2 - A000107(A000108(n)-1). The first part A000108(n)^2 means the cartes of two n+2-gons separated by the middle chord, second part is the duplicated joins need to be removed. - Yuchun Ji, Aug 11 2020

Crossrefs

Programs

  • Maple
    A246860 := proc (n) return (1/8)*integrate(integrate((cos(x)-cos(y))^2*(2*cos(x)+2*cos(y))^(2*n), y = 0 .. 2*Pi), x = 0 .. 2*Pi)/Pi^2+(1/2)*integrate((1-cos(z)^2)*(2*cos(z))^(2*n), z = 0 .. 2*Pi)/Pi end proc; seq(A246860(n), n = 1 .. 21);
  • Mathematica
    a[n_] := a[n] = (1/8)*Integrate[Integrate[(Cos[x] - Cos[y])^2 * (2 Cos[x] + 2 Cos[y])^(2 n), {y, 0, 2 Pi}], {x, 0, 2 Pi}]/ Pi^2 + (1/2)*Integrate[(1 - Cos[z]^2)*(2 Cos[z])^(2 n), {z, 0, 2 Pi}]/Pi;
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 21}] (* Jean-François Alcover, Feb 05 2023 *)

Formula

In the MathOverflow link, Nathaniel Johnston conjectures a(n) = A000108(n)*(A000108(n)+1)/2. - Robert Israel, Jan 17 2020

A000524 Number of rooted trees with n nodes, 2 of which are labeled.

Original entry on oeis.org

2, 9, 34, 119, 401, 1316, 4247, 13532, 42712, 133816, 416770, 1291731, 3987444, 12266845, 37627230, 115125955, 351467506, 1070908135, 3257389088, 9892759091, 30002923380, 90879555521, 274963755791, 831064788976
Offset: 2

Views

Author

Keywords

References

  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 134.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column k=2 of A008295.

Programs

  • Maple
    b:= proc(n) option remember; if n<=1 then n else add(k*b(k)* s(n-1, k), k=1..n-1)/(n-1) fi end: s:= proc(n,k) option remember; add(b(n+1-j*k), j=1..iquo(n,k)) end: B:= proc(n) option remember; add(b(k)*x^k, k=1..n) end: a:= n-> coeff(series(B(n-1)^2*(2-B(n-1))/(1-B(n-1))^3, x=0, n+1), x,n): seq(a(n), n=2..25); # Alois P. Heinz, Aug 21 2008
  • Mathematica
    b[n_] := b[n] = If[n <= 1, n, Sum[k*b[k]*s[n-1, k], {k, 1, n-1}]/(n-1)]; s[n_, k_] := s[n, k] = Sum[b[n+1 - j*k], {j, 1, Quotient[n, k]}]; B[n_] := B[n] = Sum[b[k]*x^k, {k, 1, n}]; a[n_] := Coefficient[Series[B[n-1]^2*((2 - B[n-1])/ (1 - B[n-1])^3), {x, 0, n+1}], x, n]; Table[a[n], {n, 2, 25}] (* Jean-François Alcover, Dec 20 2012, translated from Alois P. Heinz's Maple program *)

Formula

G.f.: A(x) = B(x)^3+2*B(x)^2 where B(x) is g.f. of A000107.
G.f.: A(x) = B(x)^2*(2-B(x))/(1-B(x))^3, where B(x) is g.f. for rooted trees with n nodes, cf. A000081. - Vladeta Jovovic, Oct 19 2001

Extensions

More terms, new description and formula from Christian G. Bower, Nov 15 1999
Showing 1-10 of 16 results. Next