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-3 of 3 results.

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

A346905 Triangle read by rows: T(n,k) is the number of ways of choosing a k-dimensional cube from the vertices of an n-dimensional hypercube; 0 <= k <= n.

Original entry on oeis.org

1, 2, 1, 4, 6, 1, 8, 28, 6, 1, 16, 120, 36, 8, 1, 32, 496, 200, 40, 10, 1, 64, 2016, 1120, 280, 60, 12, 1, 128, 8128, 6272, 2240, 280, 84, 14, 1, 256, 32640, 35392, 15232, 2800, 448, 112, 16, 1, 512, 130816, 200832, 103936, 34272, 2016, 672, 144, 18, 1
Offset: 0

Views

Author

Peter Kagey, Aug 06 2021

Keywords

Examples

			Table begins:
n\k |   0       1       2       3      4     5    6    7   8  9
----+----------------------------------------------------------
  0 |   1;
  1 |   2,      1;
  2 |   4,      6,      1;
  3 |   8,     28,      6,      1;
  4 |  16,    120,     36,      8,     1;
  5 |  32,    496,    200,     40,    10,    1;
  6 |  64,   2016,   1120,    280,    60,   12,   1;
  7 | 128,   8128,   6272,   2240,   280,   84,  14,   1;
  8 | 256,  32640,  35392,  15232,  2800,  448, 112,  16,  1;
  9 | 512, 130816, 200832, 103936, 34272, 2016, 672, 144, 18, 1
One of the T(7,3) = 2240 ways of choosing a 3-cube from the vertices of a 7-cube is the cube with the following eight points:
(0,0,0,1,1,1,0);
(1,1,0,1,1,1,0);
(0,0,1,1,1,0,0);
(0,0,0,1,0,1,1);
(1,1,1,1,1,0,0);
(1,1,0,1,0,1,1);
(0,0,1,1,0,0,1); and
(1,1,1,1,0,0,1).
		

Crossrefs

Columns: A000079 (k=0), A006516 (k=1), A345340 (k=2).
Cf. A346906.

Programs

  • Mathematica
    T[n_, 0] := 2^n
    T[n_, k_] := 2^(n - k)*Sum[n!/(k!*(i!)^k*(n - i*k)!), {i, 1, n/k}]

Formula

T(n,0) = 2^n.
T(n,k) = 2^(n-k) * Sum_{i=1..floor(n/k)} n!/(k!*(i!)^k*(n-i*k)!).
T(n,k) = 2^(n-k) * A346906(n,k).

A362706 Number of squares formed by first n vertices of the infinite-dimensional hypercube.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 6, 6, 7, 9, 13, 16, 21, 27, 36, 36, 37, 40, 45, 50, 57, 66, 78, 85, 94, 106, 121, 136, 154, 175, 200, 200, 201, 205, 211, 219, 229, 242, 258, 271, 286, 305, 327, 351, 378, 409, 444, 463, 484, 510, 539, 571, 606, 646, 690, 729, 771, 819
Offset: 1

Views

Author

Hugo van der Sanden, Jun 22 2023

Keywords

Comments

We can take the coordinates of a vertex to represent a binary number, so we define the n-th point to have coordinates represented by the binary expansion of n-1.
Let d(m) = a(m+1) - a(m) be the shifted first differences of a(n), so that d(m) represents the additional squares introduced by the (m+1)-th vertex. Then d(0) = d(2^x) = 0; when m = 2^x + 2^y, x > y, d(m) = A115990(x - 1, x - y - 1); generally, d(m) = sum d(k) for all k formed by selecting two 1's from the binary expansion of m. Thus d(7) = d(3) + d(5) + d(6).
a(n) is a lower bound for an infinite-dimensional extension of A051602. Peter Munn notes that it is not an upper bound: for example, the vertices of a regular {k-1}-simplex duplicated at unit distance in any orthogonal direction gives T_k squares from 2k+2 points, which exceeds a(n) at 6, 10 and 12 points.

Examples

			The 6 points (0,0,0), (1,0,0), (0,1,0), (1,1,0), (0,0,1), (1,0,1) give the squares (0,0,0), (1,0,0), (0,1,0), (1,1,0) and (0,0,0), (1,0,0), (0,0,1), (1,0,1). So a(6) = 2.
		

Crossrefs

Formula

a(2^k) = A345340(k).
Showing 1-3 of 3 results.