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.

A290324 Number of (undirected) paths in the complete tripartite graph K_{n,n,n}.

This page as a plain text file.
%I A290324 #21 Feb 16 2025 08:33:49
%S A290324 6,396,67554,28336848,23986682550,35931274250076,87017657752978386,
%T A290324 318992998488391738944,1683675635040443830593798,
%U A290324 12301777316059025283613106700,120545445185882926234784081616546,1543421856441404929844846263740167376
%N A290324 Number of (undirected) paths in the complete tripartite graph K_{n,n,n}.
%H A290324 Andrew Howroyd, <a href="/A290324/b290324.txt">Table of n, a(n) for n = 1..50</a>
%H A290324 Andrew Howroyd, <a href="/A290324/a290324.txt">Formula for the number of paths</a>
%H A290324 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/CompleteTripartiteGraph.html">Complete Tripartite Graph</a>
%H A290324 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/GraphPath.html">Graph Path</a>
%t A290324 c[n_, k_, i_, j_, p_]:=Binomial[n, k] Binomial[n, i + p] Binomial[n, j + p] Binomial[k, i] Binomial[k - i, j] k!*(i + p)!*(j + p)!*2^(k - i - j)*Binomial[p + i + j - 1, k - 1](1 + n - k); a[n_]:=3*Sum[Sum[Sum[Sum[c[n, k, i, j, p], {p, k - i - j, n}], {j, 0, k - i}], {i, 0, k}], {k, n}]/2; Table[a[n], {n, 12}] (* _Indranil Ghosh_, Aug 14 2017, after PARI *)
%o A290324 (PARI)
%o A290324 c(n, k, i, j, p) = {binomial(n, k)*binomial(n, i+p)*binomial(n, j+p)*binomial(k, i)
%o A290324 * binomial(k-i, j)*k!*(i+p)!*(j+p)!*2^(k-i-j)*binomial(p+i+j-1, k-1)*(1+n-k)}
%o A290324 a(n)={3*(sum(k=1, n, sum(i=0, k, sum(j=0, k-i, sum(p=k-i-j, n, c(n, k, i, j, p) )))))/2} \\ _Andrew Howroyd_, Aug 13 2017
%o A290324 (Python)
%o A290324 from sympy import binomial, factorial
%o A290324 def c(n, k, i, j, p): return binomial(n, k)*binomial(n, i + p)*binomial(n, j + p)*binomial(k, i)*binomial(k - i, j)*factorial(k)*factorial(i + p)*factorial(j + p)*2**(k - i - j)*binomial(p + i + j - 1, k - 1)*(1 + n - k)
%o A290324 def a(n): return 3*sum([sum([sum([sum([c(n, k, i, j, p) for p in range(k - i - j, n + 1)]) for j in range(k - i + 1)]) for i in range(k + 1)]) for k in range(1, n + 1)])/2
%o A290324 print([a(n) for n in range(1, 13)]) # _Indranil Ghosh_, Aug 14 2017, after PARI
%Y A290324 Cf. A234616, A234633.
%K A290324 nonn
%O A290324 1,1
%A A290324 _Eric W. Weisstein_, Jul 27 2017
%E A290324 Terms a(5) and beyond from _Andrew Howroyd_, Aug 13 2017