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

A103501 (1/8)*number of equilateral triangles that can be formed from the points of an (n+1)X(n+1)X(n+1) lattice cube.

Original entry on oeis.org

1, 10, 46, 158, 431, 974, 2022, 3837, 6777, 11263, 17947, 27541, 40835, 58904, 83081, 114543, 155232, 206901, 271573, 351583, 449833, 569225, 712847, 884408, 1088136, 1328616, 1610007, 1937077, 2315434, 2750476, 3250073, 3820925, 4469597
Offset: 1

Views

Author

Hugo Pfoertner, Feb 08 2005

Keywords

Crossrefs

Cf. all triangles in lattice cube A103426; special triangles in lattice cube: A103427, A103428, A103429, A103499, A103500; A103158 tetrahedra in lattice cube.

Formula

a(n) = A102698(n)/8.

Extensions

a(32)-a(100) from Ray Chandler, Sep 15 2007

A098928 Number of cubes that can be formed from the points of a cubical grid of n X n X n points.

Original entry on oeis.org

0, 1, 9, 36, 100, 229, 473, 910, 1648, 2795, 4469, 6818, 10032, 14315, 19907, 27190, 36502, 48233, 62803, 80736, 102550, 128847, 160271, 197516, 241314, 292737, 352591, 421764, 501204, 592257, 696281, 814450, 948112, 1098607, 1267367
Offset: 1

Views

Author

Ignacio Larrosa Cañestro, Oct 19 2004, Sep 29 2009

Keywords

Comments

Skew cubes are allowed.

Examples

			For n = 3 there are 8 cubes of volume 1 and 1 cube of volume 8; thus a(3)=9. - _José María Grau Ribas_, Mar 15 2014
a(6)=229 because we can place 15^2 cubes in a 6 X 6 X 6 cubical grid with their edges parallel to the faces of the grid, plus 4 cubes of edge 3 with a vertex in each face of the lattice and the other two vertices on a diagonal.
		

Crossrefs

Cf. A103158.
Cf. A000537 (without skew cubes), A002415 (number of squares with corners on an n X n grid), A108279, A102698.

Programs

  • Mathematica
    Needs["Quaternions`"];
    (* Initialize variables *)
    R = 20;
    NN = 1010;
    (* Quaternion operations *)
    test[q_Quaternion] :=
      Module[{unit, res, a, b, c, u, v, w, p},
       If[Round[Norm[q]] > R, Return[]];
       If[q == Quaternion[0, 0, 0, 0], Return[]];
       unit = Quaternion[0, 1, 0, 0];
       res = q ** unit ** Conjugate[q];
       a = Abs[res[[2]]] + Abs[res[[3]]] + Abs[res[[4]]];
       unit = Quaternion[0, 0, 1, 0];
       res = q ** unit ** Conjugate[q];
       b = Abs[res[[2]]] + Abs[res[[3]]] + Abs[res[[4]]];
       unit = Quaternion[0, 0, 0, 1];
       res = q ** unit ** Conjugate[q];
       c = Abs[res[[2]]] + Abs[res[[3]]] + Abs[res[[4]]];
       For[i = 1, i <= (R - 1)/Max[a, b, c], i++,
        If[SquareFreeQ[i], {u = a*i;
          v = b*i;
          w = c*i;
          p = Max[u, v, w] + 1;
          coe[[p + 1, 4]] += (1);
          coe[[p + 1, 3]] -= (u + v + w);
          coe[[p + 1, 2]] += (u*v + v*w + w*u);
          coe[[p + 1, 1]] -= (u*v*w)}]]];
    (* Set up coefficient matrix *)
    coe = ConstantArray[0, {NN, 4}];
    (* Loop through quaternions *)
    rt = Ceiling[Sqrt[R]] + 1;
    For[s = -rt, s <= rt, s++,
      For[x = -rt, x <= rt, x++,
       For[y = -rt, y <= rt, y++,
        For[z = -rt, z <= rt, z++, test[Quaternion[s, x, y, z]];
         test[Quaternion[s + 0.5, x + 0.5, y + 0.5, z + 0.5]];]]]];
    newCoe = coe;
    newCoe[[2 ;; ;; 2]] = coe[[2 ;; ;; 2]]/2;
    (* Calculate and output results *)
    For[i = 2, i <= R + 1, i++, ans = 0;
      For[j = 4, j >= 1, j--, newCoe[[i, j]] += newCoe[[i - 1, j]];
       ans = ans*(i - 1) + newCoe[[i, j]];
       ];
      Print[i - 1, " ", ans/24];];
    (* Haomin Yang, Aug 29 2023 *)

Extensions

Edited by Ray Chandler, Apr 05 2010
Further edited by N. J. A. Sloane, Mar 31 2016

A334581 Number of ways to choose 3 points that form an equilateral triangle from the A000292(n) points in a regular tetrahedral grid of side length n.

Original entry on oeis.org

0, 0, 4, 24, 84, 224, 516, 1068, 2016, 3528, 5832, 9256, 14208, 21180, 30728, 43488, 60192, 81660, 108828, 142764, 184708, 236088, 298476, 373652, 463524, 570228, 696012, 843312, 1014720, 1213096, 1441512, 1703352, 2002196, 2341848, 2726400, 3160272, 3648180
Offset: 0

Views

Author

Peter Kagey, May 06 2020

Keywords

Comments

a(n) >= 4 * A269747(n).
a(n) >= 4 * A000389(n+3) = A210569(n+2).
a(n) >= 4 * (n-1) + 4 * a(n-1) - 6 * a(n-2) + 4 * a(n-3) - a(n-4) for n >= 4.

Crossrefs

Cf. A000332 (equilateral triangles in triangular grid), A269747 (regular tetrahedra in a tetrahedral grid), A102698 (equilateral triangles in cube), A103158 (regular tetrahedra in cube).

A334881 Number of squares in 3-dimensional space whose four vertices have coordinates (x,y,z) in the set {1,...,n}.

Original entry on oeis.org

0, 0, 6, 54, 240, 810, 2274, 5304, 10752, 19992, 34854, 57774, 91200, 139338, 206394, 296832, 417120, 575556, 779238, 1037514, 1359792, 1760694, 2251362, 2845140, 3554976, 4404876, 5416278, 6605946, 7996896, 9621678, 11500962, 13667772, 16143552, 18973608, 22190406
Offset: 0

Views

Author

Peter Kagey, May 14 2020

Keywords

Comments

a(n) >= 3*n*A002415(n).

Examples

			For n = 5, one such square has vertex set {(2,1,1), (5,4,1), (4,5,5), (1,2,5)}.
		

Crossrefs

Cf. A002415 (squares in square grid), A098928 (cubes in cube grid).

Extensions

a(7)-a(12) from Pontus von Brömssen, May 15 2020
a(13)-a(20) from Peter Kagey, Jul 29 2020 via Mathematics Stack Exchange link
Terms a(21) and beyond from Zachary Kaplan, Sep 01 2020, via Mathematics Stack Exchange link

A338323 a(n) is the number of regular k-gons in three dimensions with all k vertices (x,y,z) in the set {1,2,...,n}^3.

Original entry on oeis.org

0, 0, 14, 138, 640, 2190, 6042, 13824, 28400, 53484, 94126, 156462, 248568, 380802, 564242, 813528, 1146472, 1581936, 2143878, 2857194, 3749240, 4854942, 6210442, 7856340, 9832056, 12194784, 15002678, 18312486, 22183672, 26693382, 31909362, 37916916, 44802728
Offset: 0

Views

Author

Peter Kagey, Oct 22 2020

Keywords

Comments

The only regular polygons that can appear are equilateral triangles, squares, and regular hexagons.

Examples

			For the 3 X 3 X 3 grid, the a(3) = 138 regular polygons are A102698(3-1) = 80 triangles, A334881(3) = 54 squares, and A338322(3) = 4 hexagons.
An example of each shape, listed by the coordinates of their vertices:
Triangle: (1,2,1), (2,1,3), (3,3,2)
Square:   (1,1,1), (2,1,1), (2,2,1), (1,2,1)
Hexagon:  (1,1,2), (1,2,3), (2,1,1), (2,3,3), (3,2,1), (3,3,2)
		

Crossrefs

Cf. A102698 (equilateral triangles), A334881 (squares), A338322 (regular hexagons).
The two-dimensional case is given by A002415.

Formula

a(n) = A102698(n-1) + A334881(n) + A338322(n) for n >= 2.

A178797 Number of regular octahedra that can be formed using the points in an (n+1)X(n+1)X(n+1) lattice cube.

Original entry on oeis.org

0, 1, 8, 32, 104, 261, 544, 1000, 1696, 2759, 4296, 6434, 9352, 13243, 18304, 24774, 32960, 43223, 55976, 71752, 90936, 113973, 141312, 173436, 210960, 254587, 305000, 364406, 432824, 511421, 600992, 702556, 817200, 946131, 1090392, 1251238
Offset: 1

Views

Author

Eugen J. Ionascu, Jun 15 2010

Keywords

Examples

			a(2)=1 because there is 1 way to form a regular octahedron using points of a {0,1,2}^3 lattice cube.
		

Crossrefs

Extensions

Edited by Ray Chandler, Jul 27 2010

A338322 a(n) is the number of regular hexagons with all six vertices (x,y,z) in the set {1,2,...,n}^3.

Original entry on oeis.org

0, 0, 0, 4, 32, 116, 320, 728, 1472, 2796, 5056, 8584, 13792, 21136, 31168, 45464, 64704, 90036, 122784, 164472, 216864, 281584, 360416, 457400, 574304, 714644, 881312, 1077612, 1306720, 1575088, 1884928, 2245336, 2658592, 3130028, 3665376, 4277376, 4967424
Offset: 0

Views

Author

Peter Kagey, Oct 22 2020

Keywords

Examples

			The a(3) = 4 hexagons with integer coordinates in {1,2,3} have vertices:
  (1,1,2), (1,2,3), (2,1,1), (2,3,3), (3,2,1), (3,3,2);
  (1,1,2), (1,2,1), (2,1,3), (2,3,1), (3,2,3), (3,3,2);
  (1,2,1), (1,3,2), (2,1,1), (2,3,3), (3,1,2), (3,2,3); and
  (1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2), (3,2,1).
One of the a(5) = 116 hexagons has vertices:
  (2,2,1), (1,4,2), (2,5,4), (4,4,5), (5,2,4), (4,1,2).
		

Crossrefs

Cf. A102698 (equilateral triangles), A334881 (squares), A338323 (regular polygons).

Formula

a(n) >= 4*(n-2)^3 for n >= 2.

A226558 Number of equilateral triangles with coordinates (w,x,y,z) in the set {0, 1,...,n}.

Original entry on oeis.org

64, 1984, 23232, 153824, 724352, 2661504, 8208640, 22114304, 53570368, 119129856, 246971072, 482429024, 896290944, 1594476160, 2732250688, 4529267712, 7292346816, 11438236320, 17528382400, 26300206624
Offset: 1

Views

Author

Ray Chandler, Jun 10 2013

Keywords

Crossrefs

Cf. A102698.

A342353 Number of ways to choose 3 points that form an equilateral triangle from the A001845(n) points in a regular octahedral grid of size n.

Original entry on oeis.org

0, 8, 80, 416, 1512, 4216, 10000, 21256
Offset: 0

Views

Author

Peter Kagey, Mar 08 2021

Keywords

Comments

The octahedral grid of side length n is the set of points (x,y,z) in Z^3 such that |x|+|y|+|z| <= n. The number of points in this grid is given by A001845(n).

Examples

			For n = 1, the a(1) = 8 equilateral triangles are given by the convex hulls of {(+-1,0,0),(0,+-1,0),(0,0,+-1)}.
		

Crossrefs

Cf. A001845.
Cf. A102698 and A334581 are analogous for the cubic grid and tetrahedral grid respectively.
Showing 1-9 of 9 results.