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.

User: Heinrich Ludwig

Heinrich Ludwig's wiki page.

Heinrich Ludwig has authored 155 sequences. Here are the ten most recent ones:

A296994 Largest number of points that can be selected from an n X n X n triangular point grid so that no selected point is equally distant from two other selected points on a straight line, which is parallel to one side of the grid.

Original entry on oeis.org

1, 3, 4, 7, 10, 14, 18, 20, 23, 27, 31, 36, 42, 48, 54, 61, 68, 76, 84, 92, 98
Offset: 1

Author

Heinrich Ludwig, Mar 26 2018

Keywords

Comments

This sequence generalizes the idea of A003002 ("no 3-term arithmetic progressions") for triangular point grids.
For the same idea applied to square grids see A296468 and A300131.

Examples

			At most 54 points (X) can be chosen from a 15 X 15 X 15 triangular point grid under the condition mentioned above. Example:
                 o
                X X
               X o X
              o X X o
             X X o X X
            X o o o o X
           o o X o X o o
          o o o o o o o o
         o o X X o X X o o
        o X o o X X o o X o
       X X o o X o X o o X X
      X o X X o o o o X X o X
     o X X o o X o X o o X X o
    X X o X X o o o o X X o X X
   X o o o o X X o X X o o o o X
		

Crossrefs

Extensions

a(20) from Heinrich Ludwig, Apr 24 2018
a(21) from Heinrich Ludwig, May 01 2018

A300760 Number of ways to select 4 numbers from the set of the first n natural numbers avoiding 3-term arithmetic progressions.

Original entry on oeis.org

0, 1, 4, 10, 25, 51, 98, 165, 267, 407, 601, 849, 1175, 1580, 2089, 2703, 3452, 4338, 5395, 6622, 8058, 9706, 11606, 13758, 16210, 18963, 22066, 25520, 29379, 33645, 38376, 43571, 49293, 55545, 62391, 69831, 77937, 86710, 96223, 106477, 117550, 129444, 142241
Offset: 4

Author

Heinrich Ludwig, Mar 12 2018

Keywords

Examples

			There are 4 selections of 4 natural numbers from the set {1,2,3,4,5,6} free of 3-term arithmetic progressions: {1,2,4,5}, {1,2,5,6}, {1,3,4,6}, {2,3,5,6}.
		

Crossrefs

Column k=4 of A334187.

Programs

  • Mathematica
    Array[(#^4 - 12 #^3 + 51 #^2 - 78 # + 32)/24 + Boole[OddQ@ #] (-# + 2)/4 - Boole[Mod[#, 3] == 0]/3 - Boole[Mod[#, 4] == 0] &, 43, 4] (* Michael De Vlieger, Mar 14 2018 *)
    LinearRecurrence[{2,0,-1,0,-2,2,0,1,0,-2,1},{0,1,4,10,25,51,98,165,267,407,601},50] (* Harvey P. Dale, Feb 18 2024 *)
  • PARI
    concat(0, Vec(x^5*(1 + 2*x + 2*x^2 + 6*x^3 + 5*x^4 + 8*x^5) / ((1 - x)^5*(1 + x)^2*(1 + x^2)*(1 + x + x^2)) + O(x^60))) \\ Colin Barker, Aug 06 2018

Formula

a(n) = (n^4 - 12*n^3 + 51*n^2 - 78*n + 32)/24 + b(n) + c(n), where
b(n) = 0 for n even
b(n) = (-n + 2)/4 for n odd
c(n) = 0 for n == 1,2,5,7,10,11 (mod 12)
c(n) = -1/3 for n == 3,6,9 (mod 12)
c(n) = -4/3 for n == 0 (mod 12)
c(n) = -1 for n == 4,8 (mod 12).
a(n) = (n^4 - 12*n^3 + 51*n^2 - 78*n + 32)/24 + (n == 1 (mod 2))*(-n + 2)/4 - (n == 0 (mod 3))/3 - (n == 0 (mod 4)).
From Colin Barker, Mar 12 2018: (Start)
G.f.: x^5*(1 + 2*x + 2*x^2 + 6*x^3 + 5*x^4 + 8*x^5) / ((1 - x)^5*(1 + x)^2*(1 + x^2)*(1 + x + x^2)).
a(n) = 2*a(n-1) - a(n-3) - 2*a(n-5) + 2*a(n-6) + a(n-8) - 2*a(n-10) + a(n-11) for n>14.
(End)

A300761 Number of non-equivalent ways (mod D_2) to select 4 points from n equidistant points on a straight line so that no selected point is equally distant from two other selected points.

Original entry on oeis.org

0, 1, 3, 6, 15, 28, 53, 87, 140, 210, 310, 434, 600, 803, 1061, 1368, 1747, 2190, 2723, 3337, 4060, 4884, 5840, 6916, 8148, 9525, 11083, 12810, 14747, 16880, 19253, 21851, 24720, 27846, 31278, 34998, 39060, 43447, 48213, 53340, 58887, 64834, 71243, 78093, 85448
Offset: 4

Author

Heinrich Ludwig, Mar 15 2018

Keywords

Comments

The condition of the selection is also known as "no 3-term arithmetic progressions".
A reflection of a selection is not counted. If reflections are to be counted see A300760.

Crossrefs

Formula

a(n) = (n^4 - 12*n^3 + 54*n^2 - 88*n)/48 + (n == 1 (mod 2))*(-4*n + 19)/16 + (n == 5 (mod 6))/3 + (n == 2 (mod 6))/3 + (n == 2 (mod 4))/2.
a(n) = (n^4 - 12*n^3 + 54*n^2 - 88*n)/48 + b(n) + c(n), where
b(n) = 0 for n even
b(n) = (-4*n + 19)/16 for n odd
c(n) = 0 for n == 0,1,3,4,7,9 (mod 12)
c(n) = 1/3 for n == 5,8,11 (mod 12)
c(n) = 1/2 for n == 6,10 (mod 12)
c(n) = 5/6 for n == 2 (mod 12).
From Colin Barker, Mar 15 2018: (Start)
G.f.: x^5*(1 + x + 4*x^3 + x^4 + 5*x^5) / ((1 - x)^5*(1 + x)^2*(1 + x^2)*(1 + x + x^2)).
a(n) = 2*a(n-1) - a(n-3) - 2*a(n-5) + 2*a(n-6) + a(n-8) - 2*a(n-10) + a(n-11) for n>14.
(End)

A300131 Largest number of points that can be placed on an n X n point grid so that no point is equally distant from two other points on the same straight line.

Original entry on oeis.org

1, 4, 6, 9, 16, 17, 21, 26, 31, 34, 40, 46
Offset: 1

Author

Heinrich Ludwig, Feb 26 2018

Keywords

Comments

This definition is a 2-dimensional generalization of A003002 ("no 3-term arithmetic progressions"). It generalizes the definition of A296468 to include not only triples on horizontal or vertical lines but on any straight line.

Examples

			On a 10 X 10 point grid 34 points (X) can be placed at most. Example:
  . X . . . X X . . .
  X X . . . X X . X .
  X . X X . . . . X .
  . . X . . . . X . X
  . . . . . . . . X X
  X X . . . . . . . .
  X . X . . . . X . .
  . X . . . . X X . X
  . X . X X . . . X X
  . . . X X . . . X .
		

Crossrefs

Extensions

a(11) from Bert Dobbelaere, Jan 09 2020
a(12) from Bert Dobbelaere, Jan 12 2020

A296999 Number of nonequivalent (mod D_8) ways to place 4 points on an n X n point grid so that no point is equally distant from two other points on the same row or the same column.

Original entry on oeis.org

0, 1, 17, 226, 1550, 7221, 26120, 78484, 206242, 486640, 1056377, 2137506, 4085167, 7430276, 12964014, 21801632, 35520743, 56249658, 86880957, 131186720, 194133425, 282024809, 402949496, 566950056, 786640454, 1077397347, 1458190435, 1951789266, 2585856152, 3393157995
Offset: 1

Author

Heinrich Ludwig, Jan 21 2018

Keywords

Comments

Rotations and reflections of placements are not counted. If they are to be counted see A296998.
The condition of placements is also known as "no 3-term arithmetic progressions".

Crossrefs

Programs

  • Mathematica
    Array[(#^8 - 6 #^6 - 12 #^5 + 64 #^4 + 8 #^3 - 136 #^2 + Boole[OddQ@ #] (14 #^4 - 96 #^3 + 162 #^2 - 92 # + 93))/192 + Boole[Mod[#, 6] == 2] #/6 + Boole[Mod[#, 4] == 2] #/4 + Boole[Mod[#, 6] == 5] (# + 1)/6 &, 30] (* Michael De Vlieger, Jan 21 2018 *)

Formula

a(n) = (n^8 - 6*n^6 - 12*n^5 + 64*n^4 + 8*n^3 - 136*n^2 + (n == 1 (mod 2))*(14*n^4 - 96*n^3 + 162*n^2 - 92*n + 93))/192 + (n == 2 (mod 6))*n/6 + (n == 2 (mod 4))*n/4 + (n == 5 (mod 6))*(n + 1)/6.
a(n) = (n^8 - 6*n^6 - 12*n^5)/192 + b(n) + c(n), where
b(n) = (64*n^4 + 8*n^3 - 136*n^2)/192 for n even,
b(n) = (78*n^4 - 88*n^3 + 26*n^2 - 92*n + 93)/192 for n odd,
c(n) = 0 for n == 0, 1, 3, 4, 7, 9 (mod 12),
c(n) = n/4 for n == 6, 10 (mod 12),
c(n) = n/6 for n == 8 (mod 12),
c(n) = 5/12*n for n == 2 (mod 12),
c(n) = (n + 1)/6 for n == 5, 11 (mod 12).
Conjectures from Colin Barker, Jan 21 2018: (Start)
G.f.: x^2*(1 + 14*x + 176*x^2 + 893*x^3 + 2861*x^4 + 6847*x^5 + 12704*x^6 + 20412*x^7 + 27052*x^8 + 33142*x^9 + 33910*x^10 + 33289*x^11 + 26586*x^12 + 20709*x^13 + 12212*x^14 + 7178*x^15 + 2639*x^16 + 1094*x^17 + 134*x^18 + 68*x^19 - 3*x^20 + 2*x^21) / ((1 - x)^9*(1 + x)^5*(1 - x + x^2)*(1 + x^2)^2*(1 + x + x^2)^2).
a(n) = 3*a(n-1) - a(n-2) - 4*a(n-3) + 4*a(n-4) - 4*a(n-5) + 5*a(n-6) + a(n-7) - 5*a(n-8) + 6*a(n-9) - 10*a(n-10) + 8*a(n-11) - 8*a(n-13) + 10*a(n-14) - 6*a(n-15) + 5*a(n-16) - a(n-17) - 5*a(n-18) + 4*a(n-19) - 4*a(n-20) + 4*a(n-21) + a(n-22) - 3*a(n-23) + a(n-24) for n>24.
(End)

A296996 Number of nonequivalent (mod D_8) ways to place 3 points on an n X n point grid so that no point is equally distant from two other points on the same row or the same column.

Original entry on oeis.org

0, 1, 14, 75, 310, 911, 2373, 5254, 10824, 20305, 36300, 61081, 99294, 154735, 234955, 345836, 498848, 702609, 973674, 1324135, 1776950, 2348511, 3069649, 3961970, 5065800, 6408961, 8043048, 10003189, 12354174, 15139615, 18439575, 22307416, 26840704, 32103905, 38214470
Offset: 1

Author

Heinrich Ludwig, Jan 12 2018

Keywords

Comments

Rotations and reflections of placements are not counted. If they are to be counted see A296997.
The condition of placements is also known as "no 3-term arithmetic progressions".

Crossrefs

Cf. A296997.

Programs

  • Mathematica
    Array[(#^6 - 3 #^4 + 5 #^3 - 4 #^2 + 4 #)/48 + Boole[OddQ@ #] (8 #^3 - 18 #^2 + 7 #)/48 &, 35] (* or *)
    Rest@ CoefficientList[Series[x^2*(1 + 11 x + 32 x^2 + 82 x^3 + 54 x^4 + 57 x^5 + 2 x^6 + 2 x^7 - x^8)/((1 - x)^7*(1 + x)^4), {x, 0, 35}], x] (* Michael De Vlieger, Jan 12 2018 *)
  • PARI
    concat(0, Vec(x^2*(1 + 11*x + 32*x^2 + 82*x^3 + 54*x^4 + 57*x^5 + 2*x^6 + 2*x^7 - x^8) / ((1 - x)^7*(1 + x)^4) + O(x^40))) \\ Colin Barker, Jan 12 2018

Formula

a(n) = (n^6 -3*n^4 +5*n^3 -4*n^2 +4n)/48 + (n == 1 mod 2)*(8*n^3 -18n^2 +7*n)/48.
From Colin Barker, Jan 12 2018: (Start)
G.f.: x^2*(1 + 11*x + 32*x^2 + 82*x^3 + 54*x^4 + 57*x^5 + 2*x^6 + 2*x^7 - x^8) / ((1 - x)^7*(1 + x)^4).
a(n) = (n^6 - 3*n^4 + 5*n^3 - 4*n^2 + 4*n) / 48 for n even.
a(n) = (n^6 - 3*n^4 + 13*n^3 - 22*n^2 + 11*n) / 48 for n odd.
a(n) = 3*a(n-1) + a(n-2) - 11*a(n-3) + 6*a(n-4) + 14*a(n-5) - 14*a(n-6) - 6*a(n-7) + 11*a(n-8) - a(n-9) - 3*a(n-10) + a(n-11) for n>11.
(End)

A296997 Number of ways to place 3 points on an n X n point grid so that no point is equally distant from two other points on the same row or the same column.

Original entry on oeis.org

0, 4, 78, 544, 2260, 7068, 18298, 41472, 85032, 161300, 287430, 486624, 789308, 1234604, 1871730, 2761728, 3979088, 5613732, 7772862, 10583200, 14193060, 18774844, 24527338, 31678464, 40487800, 51249588, 64295478, 79997792, 98772492, 121082700, 147441890, 178417664
Offset: 1

Author

Heinrich Ludwig, Dec 23 2017

Keywords

Comments

Rotations and reflections of a placement are counted. If they are to be ignored, see A296996.
The condition of placements is also known as "no 3-term arithmetic progressions".

Crossrefs

Programs

  • Mathematica
    Array[(#^6 - 3 #^4 - 3 #^3 + 8 #^2)/6 - # Boole[OddQ@ #]/2 &, 32] (* Michael De Vlieger, Dec 23 2017 *)
    CoefficientList[ Series[-2x (2 + 29x + 93x^2 + 82x^3 + 32x^4 + x^5 + x^6)/((x - 1)^7 (x + 1)^2), {x, 0, 31}], x] (* or *)
    LinearRecurrence[{5, -8, 0, 14, -14, 0, 8, -5, 1}, {0, 4, 78, 544, 2260, 7068, 18298, 41472, 85032}, 32] (* Robert G. Wilson v, Jan 15 2018 *)
  • PARI
    concat(0, Vec(2*x^2*(2 + 29*x + 93*x^2 + 82*x^3 + 32*x^4 + x^5 + x^6) / ((1 - x)^7*(1 + x)^2) + O(x^40))) \\ Colin Barker, Dec 23 2017

Formula

a(n) = (n^6 - 3*n^4 - 3*n^3 + 8*n^2)/6 - (n == 1 (mod 2))*n/2.
a(n) = (n^6 - 3*n^4 - 3*n^3 + 8*n^2)/6 for n even,
a(n) = (n^6 - 3*n^4 - 3*n^3 + 8*n^2 - 3*n)/6 for n odd.
From Colin Barker, Dec 23 2017: (Start)
G.f.: 2*x^2*(2 + 29*x + 93*x^2 + 82*x^3 + 32*x^4 + x^5 + x^6) / ((1 - x)^7*(1 + x)^2).
a(n) = 5*a(n-1) - 8*a(n-2) + 14*a(n-4) - 14*a(n-5) + 8*a(n-7) - 5*a(n-8) + a(n-9) for n>9.
(End)

A296998 Number of ways to place 4 points on an n X n point grid so that no point is equally distant from two other points on the same row or the same column.

Original entry on oeis.org

0, 1, 90, 1620, 11810, 56613, 206234, 623904, 1641654, 3882985, 8431280, 17078364, 32641102, 59401153, 103638420, 174341920, 284041304, 449881893, 694849380, 1049316180, 1552766796, 2255936441, 3223157762, 4535226864, 6292505300, 8618661337, 11664674406, 15613614884
Offset: 1

Author

Heinrich Ludwig, Dec 23 2017

Keywords

Comments

Rotations and reflections of a placement are counted.
The condition of placements is also known as "no 3-term arithmetic progressions".

Crossrefs

Programs

  • Mathematica
    Array[Binomial[#^2, 4] - 2 # (Floor[(# - 1)^2/4] (#^2 - 3) - (5 #^2/12 - 3 #/2 + 1/3 - Boole[Divisible[#, 3]]/3 + 3 Boole[OddQ@ #]/4 + Boole[Mod[#, 4] == 2])) &, 28] (* Michael De Vlieger, Dec 23 2017 *)

Formula

a(n) = binomial(n^2, 4) - (floor((n-1)^2/4)*(n^2-3) - ((5/12)*n^2 - (3/2)*n + 1/3 + (n == 0 mod 3)*(-1/3) + (n == 1 mod 2)*3/4 + (n == 2 mod 4)))*2*n.
a(n) = (n^8 -6*n^6 -12*n^5 +35*n^4 +56*n^3 -150*n^2)/24 + b(n), where
b(n) = 0 for n == 0 mod 12,
b(n) = -n^3/2 +11*n/3 for n == 1, 5, 7, 11 mod 12,
b(n) = 8*n/3 for n == 2, 10 mod 12,
b(n) = -n^3/2 +3*n for n == 3, 9 mod 12,
b(n) = 2*n/3 for n == 4, 8 mod 12,
b(n) = 2*n for n == 6 mod 12.
Conjectures from Colin Barker, Dec 23 2017: (Start)
G.f.: x^2*(1 + 87*x + 1351*x^2 + 7043*x^3 + 23072*x^4 + 52978*x^5 + 95887*x^6 + 138345*x^7 + 166488*x^8 + 164998*x^9 + 137795*x^10 + 94181*x^11 + 52940*x^12 + 23010*x^13 + 7601*x^14 + 1647*x^15 + 251*x^16 + 15*x^17 - 10*x^18) / ((1 - x)^9*(1 + x)^4*(1 + x^2)^2*(1 + x + x^2)^2).
a(n) = 3*a(n-1) - a(n-2) - 3*a(n-3) + a(n-4) - 3*a(n-5) + 8*a(n-6) - 2*a(n-8) - 2*a(n-9) - 10*a(n-10) + 10*a(n-11) + 2*a(n-12) + 2*a(n-13) - 8*a(n-15) + 3*a(n-16) - a(n-17) + 3*a(n-18) + a(n-19) - 3*a(n-20) + a(n-21) for n>21.
(End)

A296468 Largest number of points that can be placed on an n X n point grid so that no point is equally distant from two other points on the same row or column.

Original entry on oeis.org

1, 4, 6, 11, 17, 24, 28, 32, 40, 47, 57, 66, 78, 90
Offset: 1

Author

Heinrich Ludwig, Dec 13 2017

Keywords

Comments

This sequence is a 2-dimensional generalization of A003002 ("no 3-term arithmetic progressions").

Examples

			Up to 66 points (x) may be placed on a 12 X 12 point grid. Example with two symmetry axes:
x x . x x . . . . x x .
x . x . . x x . . x . x
. x x . . . . x x . x x
x . . . . x x . x x . .
x . . . x . x x . x . .
. x . x . . . x x . x .
. x . x x . . . x . x .
. . x . x x . x . . . x
. . x x . x x . . . . x
x x . x x . . . . x x .
x . x . . x x . . x . x
. x x . . . . x x . x x
		

Crossrefs

Extensions

a(13)-a(14) from Bert Dobbelaere, Jan 06 2020

A289233 Largest number of disjoint point triples that can be chosen from an n X n X n triangular point grid, each point triple forming a 2 X 2 X 2 triangle.

Original entry on oeis.org

0, 1, 1, 3, 4, 6, 9, 11, 15, 18, 22, 26, 30, 35, 39, 45, 50, 56, 63, 69, 77, 84, 92, 100, 108, 117, 125, 135, 144, 154, 165, 175, 187, 198, 210, 222, 234, 247, 259, 273, 286, 300, 315, 329, 345, 360, 376, 392, 408, 425, 441, 459, 476, 494, 513, 531, 551, 570
Offset: 1

Author

Heinrich Ludwig, Jul 08 2017

Keywords

Comments

A001840(n-1) = floor(n*(n+1)/6) is a trivial upper bound for a(n), which is not reached for n = 3, 5, 6, 8, 15, 17, 18, 20 but for all other n <= 21.
From Jon E. Schoenfield, Aug 16 2017: (Start)
If n is even, then the bottom three rows of points can be assembled into n-1 of the 3-point triangles; e.g., the full grid for n = 8 has 8*9/2 = 36 points, of which the 21 points in the bottom three rows can be assembled into 7 three-point triangles as follows, leaving the remaining 15 points in the same triangular arrangement as in the full grid for the n = 5 case:
.
Row 1: .
.
Row 2: . .
.
Row 3: . . .
.
Row 4: . . . .
.
Row 5: . . . . .
.
Row 6: 2---2 4---4 6---6
. \ / \ / \ /
Row 7: 1 2 3 4 5 6 7
. / \ / \ / \ / \
Row 8: 1---1 3---3 5---5 7---7
.
Thus, if n is even, then a(n) >= a(n-3) + n - 1.
Similarly, if n mod 3 = 2, then the bottom two rows of points can be assembled into (2n-1)/3 of the 3-point triangles; e.g., of the 36 points in the full grid for n = 8, the 15 points in the bottom two rows can be assembled into 5 three-point triangles as follows, leaving the remaining 21 points in the same triangular arrangement as in the full grid for the n=6 case:
.
Row 1: .
.
Row 2: . .
.
Row 3: . . .
.
Row 4: . . . .
.
Row 5: . . . . .
.
Row 6: . . . . . .
.
Row 7: 1 2---2 3 4---4 5
. / \ \ / / \ \ / / \
Row 8: 1---1 2 3---3 4 5---5
.
Thus, if n mod 3 = 2, then a(n) >= a(n-2) + (2n-1)/3.
Given the terms through a(21) = 77, the two lower bounds above and the upper bound a(n) <= floor(n(n+1)/6) are sufficient to establish that a(22) = 84, a(23) = 92, a(24) = 100, a(26) = 117, and a(28) = 135. (A solution with 108 three-point triangles can be constructed on the n = 25 grid.)
Conjecture: a(n) = floor((n(n+1) - floor(((n+3) mod 12)/6))/6); i.e., the upper bound floor(n(n+1)/6) can be reached unless n(n+1)/2 is a multiple of 3 and (n+3) mod 12 >= 6, in which case a(n) falls short of the upper bound by 1. (End)
a(31) = 165, a(33) = 187, a(34) = 198, a(35) = 210, a(36) = 222, a(37) = 234, a(38) = 247, and a(40) = 273. - Rob Pratt, Dec 19 2017
From Jon E. Schoenfield, Dec 21 2017: (Start)
If we refer to a triangular grid with n points on each side simply as an "n-triangle", then for any n > 13, the n-triangle can be broken into an (n-12)-triangle, a 12-triangle, and a parallelogram-shaped grid with 12 points on each of two opposite sides and n-12 points on each of the other two sides (with n-12 > 1). E.g., we can break the 21-triangle into (1) a 9-triangle, (2) a 12-triangle, and (3) a 9 X 12 parallelogram grid:
1 ^
1 1 |
1 1 1 |
1 1 1 1 |
1 1 1 1 1 9
1 1 1 1 1 1 |
1 1 1 1 1 1 1 |
1 1 1 1 1 1 1 1 |
1 1 1 1 1 1 1 1 1__v
2 3 3 3 3 3 3 3 3 3 ^
2 2 3 3 3 3 3 3 3 3 3 |
2 2 2 3 3 3 3 3 3 3 3 3 |
2 2 2 2 3 3 3 3 3 3 3 3 3 |
2 2 2 2 2 3 3 3 3 3 3 3 3 3 |
2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 12
2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 |
2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 |
2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 |
2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 |
2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 |
2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 ____v
| || |
|<---------12---------->||<-------9------->|
.
All points of a 2 X 12 parallelogram grid and all points of a 3 X 12 parallelogram grid can be assembled into 3-point triangles using the simple patterns
.
o o o o .
o . o . .
. . o o .
o o o . .
o . o o .
. . and o . .
o o o o .
o . o . .
. . o o .
o o o . .
o . o o .
. . o . .
.
respectively, so those patterns can be combined to assemble a k X 12 parallelogram completely into 3-point triangles for any k > 1. Thus, since both the 12-triangle and the (n-12) X 12 parallelogram grid can be completely assembled into 3-point triangles for any n > 13, we have, for n > 13, a(n) >= a(n-12) + a(12) + (n-12)*12/3, which reduces to a(n) >= a(n-12) + 4n - 22. In particular, if the trivial upper bound floor(n*(n+1)/6) is reached by a(n), then it is also reached by a(n+12k) for any positive integer k. Given a(1)..a(12), this is sufficient to prove that a(n) = floor(n*(n+1)/6) except when n mod 12 is 3, 5, 6, or 8; in those cases, a(n) >= floor(n*(n+1)/6) - 1. (End)
Theorem 1.1 of the Conway and Lagarias link indicates that all the points can be covered by 3-point triangles iff n mod 12 = 0, 2, 9, or 11. That fact, together with the above results for a(n) in the specific cases for n in [1, 3..8, 10] and the recursive lower bound a(n) >= a(n-12) + 4n - 22, is sufficient to prove that a(n) = floor(n*(n+1)/6) - d where d is 1 when n mod 12 is in [3, 5, 6, 8] and 0 otherwise. - Jon E. Schoenfield, Dec 26 2017

Examples

			From a 21 X 21 X 21 point grid up to 77 disjoint 2 X 2 X 2 triangles (aaa, bbb, ...) can be chosen. Selections like the one below with no point left are very rare compared to C(400, 77). 400 is the total number of 2 X 2 X 2 triangles in the 21-grid.
                        a
                       a a
                      c c b
                     d c b b
                    d d f f e
                   h h g f e e
                  i h g g k k j
                 i i l m m k j j
                p p l l m n q q o
               r p s t t n n q o o
              r r s s t u w w x x v
             y a a b b u u w z x v v
            y y a c b d f f z z g g e
           j j h c c d d f i k k g e e
          l j h h m m n n i i k o o p p
         l l w w q m r n s x x t o u p v
        y z z w q q r r s s x t t u u v v
       y y z f f a g g b h h c i i d j j e
      k k l l f a a g b b h c c i d d j e e
     m k n l o u u p v v q w w r x x s y y t
    m m n n o o u p p v q q w r r x s s y t t
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Floor[n (n +1)/6] - If[ !MemberQ[{3, 5, 6, 8}, Mod[n, 12]], 0, 1]; Array[f, 58] (* or *)
    CoefficientList[ Series[(-x +x^2 -x^3 +x^4 -x^5)/((-1 +x)^3 (1 +x -x^3 +x^5 +x^6)), {x, 0, 57}], x] (* or *)
    LinearRecurrence[{2, 0, -1, -2, 2, 1, 0, -2, 1}, {0, 1, 1, 3, 4, 6, 9, 11, 15}, 58] (* Robert G. Wilson v, Dec 26 2017 *)

Formula

G.f.: x*(1 - x + x^2 - x^3 + x^4) / ((1 - x)^3*(1 + x + x^2)*(1 - x^2 + x^4)) (conjectured). - Colin Barker, Jul 08 2017
a(n) = floor(n*(n+1)/6) except when n mod 12 is 3, 5, 6, or 8; in those cases, a(n) = floor(n*(n+1)/6) - 1. - Jon E. Schoenfield, Dec 25 2017

Extensions

a(22)-a(26) from Jon E. Schoenfield, Aug 16 2017
a(27)-a(28) from Rob Pratt, Dec 19 2017
More terms from Jon E. Schoenfield, Dec 25 2017