OFFSET
0,4
LINKS
Albert Stadler, Problems and Solutions, Problem 12261, The American Mathematical Monthly, 128:6 (2021), 563.
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
EXAMPLE
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.
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 *)
PROG
(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<<n-1 if n else 0 # Chai Wah Wu, Jan 04 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Kagey, May 30 2021
EXTENSIONS
a(9)-a(23) from Drake Thomas, May 30 2021
STATUS
approved