A005780 Erroneous version of A033678.
1, 0, 1, 3, 38, 680
Offset: 1
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.
Irregular triangle T(n,k) (with rows n >= 0 and columns k = 0..n*(n-1)/2) begins 1; 1, 1, 0, 1, 0, 0, 1; 1, 0, 0, 4, 3, 0, 0; 1, 0, 0, 10, 15, 12, 15, 10, 0, 0, 1; 1, 0, 0, 20, 45, 72, 160, 240, 195, 120, 96, 60, 15, 0, 0, 0; ...
w := p->expand(simplify(2^(-p)*(1+x)^(p*(p-1)/2)*add(binomial(p,n)*( (1-x)/(1+x))^(n*(p-n)), n=0..p))); T := (n,k)->coeff(w(n),x,k);
w[p_] := 2^-p*(1+x)^(p*(p-1)/2)*Sum[Binomial[p, n]*((1-x)/(1+x))^(n*(p-n)), {n, 0, p}]; T[n_, k_] := SeriesCoefficient[w[n], {x, 0, k}]; Table[T[n, k], {n, 0, 8}, {k, 0, n(n-1)/2}] // Flatten (* Jean-François Alcover, Jan 12 2015, translated from Maple *) (* Edited by Petros Hadjicostas, Feb 18 2021 to make sure the lengths of rows n = 0, 1, 2 are n*(n-1)/2 + 1 = 1, 1, 2, respectively. *)
Some a(n) formulas, see A127671: a(0) = undefined a(1) = 1*x(1) a(2) = 1*x(2) - x(1)^2 a(3) = 1*x(3) - 3*x(1)*x(2) + 2*x(1)^3 a(4) = 1*x(4) - 4*x(1)*x(3) - 3*x(2)^2 + 12*x(1)^2*x(2) - 6*x(1)^4 a(5) = 1*x(5) - 5*x(1)*x(4) - 10*x(2)*x(3) + 20*x(1)^2*x(3) + 30*x(1)*x(2)^2 - 60*x(1)^3*x(2) + 24*x(1)^5
nmax:=22: with(numtheory): b := proc(n): sigma(n) end: a:= proc(n) option remember; b(n) - add(k*binomial(n, k)*b(n-k)*a(k), k=1..n-1)/n: end: seq(a(n), n=1..nmax); # End first LOG program. nmax:=22: with(numtheory): b := proc(n): sigma(n) end: t1 := log(1 + add(b(n)*x^n/n!, n=1..nmax+1)): t2 := series(t1, x, nmax+1): a := proc(n): n!*coeff(t2, x, n) end: seq(a(n), n=1..nmax); # End second LOG program. nmax:=22: with(numtheory): b := proc(n): sigma(n) end: f := series(exp(add(r(n)*x^n/n!, n=1..nmax+1)), x, nmax+1): d := proc(n): n!*coeff(f, x, n) end: a(1):=b(1): r(1):= b(1): for n from 2 to nmax+1 do r(n) := solve(d(n)-b(n), r(n)): a(n):=r(n): od: seq(a(n), n=1..nmax); # End third LOG program.
a[1] = 1; a[n_] := a[n] = DivisorSigma[1, n] - Sum[k*Binomial[n, k] * DivisorSigma[1, n-k]*a[k], {k, 1, n-1}]/n; Table[a[n], {n, 1, 22}] (* Jean-François Alcover, Feb 27 2017 *)
N=33; x='x+O('x^N); Vec(serlaplace(log(1+sum(n=1,N,sigma(n)*x^n/n!)))) \\ Joerg Arndt, Feb 27 2017
Triangle T(n,k) (with rows n >= 0 and columns k = 0..n*(n-1-[0==n mod 2])/2) begins: 1; 1; 1; 1, 0, 0, 1; 1, 0, 0, 4, 3; 1, 0, 0, 10, 15, 12, 15, 10, 0, 0, 1; 1, 0, 0, 20, 45, 72, 160, 240, 195, 120, 96, 60, 15; ...
CoeffList := p -> op(PolynomialTools:-CoefficientList(p, x)): w := p -> factor(2^(-p)*(1 + x)^(p*(p - 1)/2)* add(binomial(p, n)*((1 - x)/(1 + x))^(n*(p - n)), n=0..p)): seq(print(CoeffList(w(n))), n = 0..6); # Peter Luschny, Feb 18 2021
T[n_] := (1/2^n)(1+x)^Binomial[n, 2] Sum[Binomial[n, k] ((1-x)/(1+x))^(k(n-k)), {k, 0, n}] // CoefficientList[#, x]&; T /@ Range[0, 8] // Flatten (* Jean-François Alcover, Feb 20 2021, after Andrew Howroyd *)
Row(n)=Vecrev(2^(-n)*(1+x)^binomial(n, 2)*sum(k=0, n, binomial(n, k)*((1-x)/(1+x))^(k*(n-k)))) \\ Andrew Howroyd, Jan 05 2021
T(3,1) = 1 counts the complete graph on 3 labeled vertices. T(3,3) = 1 counts the empty graph (no edges) on 3 labeled vertices. Triangular array T(n,k) (with rows n >= 1 and columns k = 1..n) begins: 1; 0, 1; 1, 0, 1; 3, 4, 0, 1; 38, 15, 10, 0, 1; 720, 238, 45, 20, 0, 1; ...
nn = 8; e = Sum[2^Binomial[n - 1, 2] x^n/n!, {n, 1, nn}]; Prepend[Drop[Map[Insert[#, 0, -2] &, Map[Select[#, # > 0 &] &, Range[0, nn]! CoefficientList[ Series[(e + 1)^y, {x, 0, nn}], {x, y}]]], 2], {1}] // Grid
# uses[bell_matrix from A264428] # Adds a column 1, 0, 0, 0, ... at the left side of the triangle. bell_matrix(lambda n: A033678(n+1), 9) # Peter Luschny, Jan 17 2016
Irregular triangle T(n,k) (with rows n >= 0 and columns k = 0..n*(n-1)/2) begins 0; 1; 0, 0; 0, 0, 0, 1; 0, 0, 0, 0, 3, 0, 0; 0, 0, 0, 0, 0, 12, 15, 10, 0, 0, 1; 0, 0, 0, 0, 0, 0, 60, 180, 195, 120, 90, 60, 15, 0, 0, 0; ... T(5,5) = 12 because we have (5-1)!/2 = 12 non-isomorphic labelings of the following Eulerian graph with 5 vertices and 5 edges: * / \ / \ / \ * * \ / \ / *--* T(5,6) = 15 because we have 5*3 = 15 non-isomorphic labelings of the following Eulerian graph with 5 vertices and 6 edges: *______* /|\ / / | \ / * | \/ \ | * \| * In the above graph, we have 5 choices for the vertex that is common to both triangles and using the other 4 numbers 1, 2, 3, 4 we have the following 3 possible labelings of the other 4 vertices: {{1,2},{3,4}}, {{1,3},{2,4}}, {{1,4},{2,3}}. T(5,7) = 10 because we have C(5,2) = 10 non-isomorphic labelings of the following Eulerian graph with 5 vertices and 7 edges: V = {a,b,c,d,e} and E = {{a,b}, {a,c}, {a,d}, {a,e}, {b,c}, {b,d}, {b,e}}. T(5,10) = 1 because all labelings of the complete graph with 5 vertices (and C(5,2) = 10 edges) are isomorphic. There are no other (unlabeled) Eulerian graphs with 5 vertices: A003049(5) = 4. (In the name of A003049, the phrase "connected Euler graphs" is according to Mallows and Sloane (1975). According to Harary and Palmer (1973), we only need to say "Euler graphs" because, for them, an Euler graph is connected and even.)
# Slow program based on Eqs. (1.4.7), (1.4.18), and (1.4.19) in Harary and Palmer (1973). w := proc(n, y) local m: expand(simplify(2^(-n)*(y + 1)^(1/2*n*(n - 1))*add(binomial(n, m)*((1 - y)/(y + 1))^(m*(n - m)), m = 0 .. n))): end proc: u := proc(x, y, M) local n: add(w(n, y)*x^n/n!, n = 0 .. M): end proc: T := proc(n, k) coeftayl(log(u(x, y, n + 2)), [x, y] = [0, 0], [n, k])*n!: end proc: # Another, slightly faster, program based on one of the recurrences: S := proc(n, k) local s, t: add(binomial(n, s)*add((-1)^t*binomial(s*(n - s), t)*binomial(binomial(s, 2) + binomial(n - s, 2), k - t), t = 0 .. k), s = 0 .. n)/2^n: end proc: # A058878 T := proc(n, k) local x, s, t: option remember: if n = 0 then x := 0: end if: if 1/2*n*(n - 1) < k then x := 0: end if: if 1 <= n and 0 <= k and k <= 1/2*n*(n - 1) then x := S(n, k) - add(add(binomial(n - 1, s)*T(s + 1, t)*S(n - 1 - s, k - t), t = 0 .. k), s = 0 .. n - 2): end if: x: end proc: # Third program based on another recurrence (the S(n,k) is as above): T1 := proc(n, k) local x, s, t: option remember: if k = 0 and (n = 0 or 2 <= n) then x := 0: end if: if n = 1 and k = 0 then x := 1: end if; if 1/2*n*(n - 1) < k then x := 0: end if: if 2 <= n and 1 <= k and k <= 1/2*n*(n - 1) then x := S(n, k) - add(add((t + 1)*binomial(n, s)*T1(s, t + 1)*S(n - s, k - 1 - t)/k, t = 0 .. k - 2), s = 0 .. n) - add(binomial(n, s)*T1(s, k), s = 0 .. n - 1): end if: x: end proc:
S[n_, k_] := S[n, k] = Sum[Binomial[n, s]*Sum[(-1)^t* Binomial[s*(n-s), t]*Binomial[Binomial[s, 2] + Binomial[n-s, 2], k-t], {t, 0, k}], {s, 0, n}]/2^n; T[n_, k_] := T[n, k] = If[n == 0 || k > n(n-1)/2, 0, S[n, k] - Sum[Binomial[n-1, s]*T[s+1, t]*S[n-1-s, k-t], {t, 0, k}, {s, 0, n-2}]]; Table[T[n, k], {n, 0, 8}, {k, 0, n(n-1)/2}] // Flatten (* Jean-François Alcover, Feb 14 2023, after 2nd Maple program *)
a(4) = 8 because there are 1+4+3=8 labelings on these three graphs 1) o o o o 2) o-o |/ o o 3) o-o | | o-o
nn = 18; Clear[g];g[z_] := Sum[2^Binomial[n - 1, 2] z^n/n!, {n, 1, nn}];Range[0, nn]! CoefficientList[Series[Exp[z] (Log[g[z] + 1] - z + 1), {z, 0, nn}], z]
Comments