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.

A344854 The number of equilateral triangles with vertices from the vertices of the n-dimensional hypercube.

Original entry on oeis.org

0, 0, 0, 8, 64, 320, 2240, 17920, 121856, 831488, 6215680, 46069760, 333639680, 2468257792, 18538397696, 138630955008, 1038902624256, 7848847736832, 59474614157312, 451122104369152, 3432752856694784, 26200670667276288, 200322520455315456, 1534319564383322112
Offset: 0

Views

Author

Peter Kagey, May 30 2021

Keywords

Examples

			For n = 3, the a(3) = 8 equilateral triangles are
  (0,0,0), (1,1,0), and (1,0,1);
  (0,0,0), (1,1,0), and (0,1,1);
  (0,0,0), (1,0,1), and (0,1,1);
  (1,0,0), (0,1,0), and (0,0,1);
  (1,0,0), (0,1,0), and (1,1,1);
  (1,0,0), (0,0,1), and (1,1,1);
  (0,1,0), (0,0,1), and (1,1,1); and
  (1,1,0), (1,0,1), and (0,1,1).
For n = 6, the a(6) = 2240 equilateral triangles are
  (0,0,0,0,0,0),(0,0,0,0,1,1),(0,0,0,1,0,1); and
  (0,0,0,0,0,0),(0,0,1,1,1,1),(1,1,0,0,1,1); and all of the equilateral triangles that can be generated by mapping these under the 2^6*6! symmetries of the 6-cube.
		

Crossrefs

Cf. A016283 (rectangles), A345340 (squares).

Programs

  • Maple
    a := n -> 2^n*(hypergeom([-n/3, (1 - n)/3, (2 - n)/3], [1, 1], -27) - 1) / 6:
    seq(simplify(a(n)), n = 0..23); # Peter Luschny, May 31 2021
  • Mathematica
    (* Based on Drake Thomas's formula *)
    A344854[n_] := 2^n*Sum[n!/(6*(n - 3 k)!*(k!)^3), {k, 1, Floor[n/3]}]
    nmax = 20; CoefficientList[Series[E^(2*x)*(-1 + HypergeometricPFQ[{}, {1, 1}, 8*x^3])/6, {x, 0, nmax}], x] * Range[0, nmax]! (* Vaclav Kotesovec, Jun 01 2021 *)
  • Python
    from sympy import hyperexpand, Rational
    from sympy.functions import hyper
    def A344854(n): return (hyperexpand(hyper((Rational(-n,3),Rational(1-n,3),Rational(2-n,3)),(1,1),-27))-1)//3<Chai Wah Wu, Jan 04 2024

Formula

a(n) = 2^n*Sum_{k=1..floor(n/3)}n!/(6*(n - 3*k)!*k!^3). - Drake Thomas, May 30 2021
a(n) = 2^n*(hypergeom([-n/3, (1 - n)/3, (2 - n)/3], [1, 1], -27) - 1) / 6. - derived from Drake Thomas's formula by Peter Luschny, May 31 2021
From Vaclav Kotesovec, Jun 01 2021: (Start)
E.g.f.: exp(2*x)*(-1 + hypergeom([], [1, 1], 8*x^3))/6.
Recurrence: (n-3)*n^2*a(n) = 2*(4*n^3 - 15*n^2 + 13*n - 4)*a(n-1) - 4*(n-1)*(6*n^2 - 21*n + 16)*a(n-2) + 8*(n-2)*(n-1)*(31*n-90)*a(n-3) - 448*(n-3)*(n-2)*(n-1)*a(n-4).
a(n) ~ 8^n / (3^(3/2)*Pi*n). (End)
Let Exp(x, m) = Sum_{k>=0} (x^k / k!)^m, then the above e.g.f. can be stated as:
a(n) = (n!/3!) * [x^n] Exp(2*x, 1)*(Exp(2*x, 3) - 1). - Peter Luschny, Jun 01 2021

Extensions

a(9)-a(23) from Drake Thomas, May 30 2021