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

A227327 Number of non-equivalent ways to choose two points in an equilateral triangle grid of side n.

Original entry on oeis.org

0, 1, 4, 10, 22, 41, 72, 116, 180, 265, 380, 526, 714, 945, 1232, 1576, 1992, 2481, 3060, 3730, 4510, 5401, 6424, 7580, 8892, 10361, 12012, 13846, 15890, 18145, 20640, 23376, 26384, 29665, 33252, 37146, 41382, 45961, 50920, 56260, 62020, 68201, 74844
Offset: 1

Views

Author

Heinrich Ludwig, Jul 07 2013

Keywords

Comments

The sequence is an alternating composition of A178073 and A071244: a(n) = 2*A071244((n+1)/2) if n is odd, otherwise a(n) = A178073(n/2).

Examples

			for n = 3 there are the following 4 choices of 2 points (X) (rotations and reflections being ignored):
     X         X         X         .
    X .       . .       . .       X X
   . . .     X . .     . X .     . . .
		

Crossrefs

Corresponding questions about the number of ways in a square grid are treated by A083374 (2 points) and A178208 (3 points).

Programs

  • Mathematica
    Table[b = n^4 + 2*n^3 + 8*n^2; If[EvenQ[n], c = b - 8*n, c = b - 2*n - 9]; c/48, {n, 43}] (* T. D. Noe, Jul 09 2013 *)
    CoefficientList[Series[-x (x^3 - x^2 + x + 1) / ((x - 1)^5  (x + 1)^2), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 02 2013 *)
    LinearRecurrence[{3,-1,-5,5,1,-3,1},{0,1,4,10,22,41,72},50] (* Harvey P. Dale, May 11 2019 *)

Formula

a(n) = (n^4 + 2*n^3 + 8*n^2 - 8*n )/48; if n even.
a(n) = (n^4 + 2*n^3 + 8*n^2 - 2*n - 9)/48; if n odd.
G.f.: -x^2*(x^3-x^2+x+1) / ((x-1)^5*(x+1)^2). - Colin Barker, Jul 12 2013

A240444 Triangle T(n, k) = Number of ways to arrange k indistinguishable points on an n X n square grid so that no four of them are vertices of a square of any orientation.

Original entry on oeis.org

1, 1, 1, 4, 6, 4, 1, 9, 36, 84, 120, 96, 32, 1, 16, 120, 560, 1800, 4128, 6726, 7492, 5238, 1924, 232, 1, 25, 300, 2300, 12600, 52080, 166702, 416622, 808488, 1196196, 1306464, 1001364, 497940, 141336, 18208, 636, 1, 36, 630, 7140, 58800, 373632, 1895938, 7835492
Offset: 1

Views

Author

Heinrich Ludwig, May 07 2014

Keywords

Comments

The triangle is irregularly shaped: 0 <= k <= A240443(n). The first row corresponds to n = 1.
The maximal number of points that can be placed on an n X n square grid so that no four points are vertices of a square is A240443(n).

Examples

			The triangle begins:
  1,  1;
  1,  4,   6,   4;
  1,  9,  36,  84,  120,   96,   32;
  1, 16, 120, 560, 1800, 4128, 6726, 7492, 5238, 1924, 232;
...
		

Crossrefs

Cf. A240443, A000290 (column 2), A083374 (column 3), A178208 (column 4), A006857 (column 5 divided by 120), A240445 (column 6), A240446 (column 7).

A240826 Number of ways to choose three points on a centered hexagonal grid of size n.

Original entry on oeis.org

0, 35, 969, 7770, 35990, 121485, 333375, 790244, 1679580, 3280455, 5989445, 10349790, 17083794, 27128465, 41674395, 62207880, 90556280, 128936619, 180007425, 246923810, 333395790, 443749845, 582993719, 756884460, 971999700, 1235812175, 1556767485, 1944365094
Offset: 1

Views

Author

Martin Renner, Apr 17 2014

Keywords

Comments

A centered hexagonal grid of size n is a grid with A003215(n-1) points forming a hexagonal lattice.

Crossrefs

Programs

  • Maple
    seq(binomial(3*n^2-3*n+1, 3), n=1..28); # Martin Renner, May 31 2014
    op(PolynomialTools[CoefficientList](convert(series(-x^2*(35*x^4+724*x^3+1722*x^2+724*x+35)/(x-1)^7, x=0, 29), polynom), x)[2..29]); # Martin Renner, May 31 2014
  • Mathematica
    CoefficientList[Series[- x(35 x^4 + 724 x^3 + 1722 x^2 + 724 x + 35)/(x - 1)^7, {x, 0, 50}], x] (* Vincenzo Librandi, Apr 19 2014 *)
    LinearRecurrence[{7,-21,35,-35,21,-7,1},{0,35,969,7770,35990,121485,333375},40] (* Harvey P. Dale, Sep 12 2019 *)

Formula

a(n) = binomial(A003215(n-1), 3)
= binomial(3*n^2-3*n+1, 3)
= 1/2*n*(n-1)*(3*n^2-3*n+1)*(3*n^2-3*n-1)
= 9/2*n^6-27/2*n^5+27/2*n^4-9/2*n^3-1/2*n^2+1/2*n.
G.f.: -x^2*(35*x^4+724*x^3+1722*x^2+724*x+35) / (x-1)^7. - Colin Barker, Apr 18 2014
Sum_{n>=2} 1/a(n) = sqrt(3/7)*Pi*tan(sqrt(7/3)*Pi/2) + sqrt(3)*Pi*tanh(Pi/(2*sqrt(3))) - 2. - Amiram Eldar, Feb 17 2024

A227436 Triangle T(n, k) of the number of n X n binary matrices with k = 0..n^2 1's and no more than three 1's in the corners of any square sub-block.

Original entry on oeis.org

1, 1, 1, 4, 6, 4, 0, 1, 9, 36, 84, 121, 101, 38, 4, 0, 0, 1, 16, 120, 560, 1806, 4200, 7096, 8532, 6929, 3444, 876, 84, 2, 0, 0, 0, 0, 1, 25, 300, 2300, 12620, 52500, 170830, 441554, 910568, 1490996, 1912700, 1879432, 1368707
Offset: 1

Views

Author

Heinrich Ludwig, Jul 12 2013

Keywords

Comments

Rows are of lengths 2, 5, 10, ..., i^2+1,....
Every row starts with k = 0. For all n: T(n, 0) = 1.
The numbers are found by an exhaustive search among all (n^2, k)-combinations of 1's.
Another description of the sequence: Given a square grid with side n and n^2 points, T(n,k) is the number of ways to choose k points of the grid, so that no 4 of the chosen points form a square with sides parallel to the grid.

Examples

			T(n, k) written as a triangle
  1,1;
  1,4,6,4,0;
  1,9,36,84,121,101,38,4,0,0;
  1,16,120,560,1806,4200,7096,8532,6929,3444,876,84,2,0,0,0,0;
  ...
For n = 4 there are 2 matrices with exactly k = 12 1's so that no more than three 1's are in the corners of any square sub-block.
  [0 1 1 1]    [1 1 1 0]
  [1 1 0 1]    [1 0 1 1]
  [1 0 1 1]    [1 1 0 1]
  [1 1 1 0]    [0 1 1 1]
		

Crossrefs

Written T(n,k) as a triangle, column k = 1 gives the square numbers A000290, column k = 2 is A083374, column k = 3 is A178208.
A227133(n) is the highest index k of a number greater than zero in the n-th row.

A217482 Quarter-square tetrahedrals: a(n) = k*(k - 1)*(k - 2)/6, k = A002620(n).

Original entry on oeis.org

0, 0, 0, 0, 4, 20, 84, 220, 560, 1140, 2300, 4060, 7140, 11480, 18424, 27720, 41664, 59640, 85320, 117480, 161700, 215820, 287980, 374660, 487344, 620620, 790244, 988260, 1235780, 1521520, 1873200, 2275280, 2763520, 3317040, 3981264, 4728720, 5616324, 6608580
Offset: 0

Views

Author

Raphie Frank, Oct 04 2012

Keywords

Comments

Observation: (3/2)*a(n) + 2 is a power of 2 up to n = 6 (giving {2, 2, 2, 2, 8, 32, 128}).
Conjecture: There are no other tetrahedral numbers (Tetra_n = A000292) > 84 such that (3/2)*Tetra_n + 2 is a power of 2. This is true to at least 1.41*10^1505 per computer check by Charles R Greathouse IV on Physics Forums (Nov 2010).

Crossrefs

Programs

  • Maple
    a:= n-> binomial(floor(n^2/4), 3):
    seq(a(n), n=0..41);  # Alois P. Heinz, Feb 16 2024
  • Mathematica
    (#*(#-1)*(#-2)/6)& /@ Table[Floor[n^2/4], {n, 0, 20}] (* Amiram Eldar, Feb 17 2024 *)
  • PARI
    a(n)=my(k=floor(n^2/4));k*(k-1)*(k-2)/6 \\ Charles R Greathouse IV, Oct 05 2012

Formula

a(n) = (1/6)*floor(n^2/4)*(floor(n^2/4)-1)*(floor(n^2/4)-2).
a(2n + 2) = A178208(n+1).
G.f.: -4*x^4*(x^4+3*x^3+7*x^2+3*x+1)/((x-1)^7*(x+1)^5). - Colin Barker, Oct 11 2012
Sum_{n>=4} 1/a(n) = Pi^2/2 - 5/12 - 3*Pi*cot(sqrt(2)*Pi)/(2*sqrt(2)) - 6*Pi*tan(sqrt(5)*Pi/2)/sqrt(5). - Amiram Eldar, Feb 17 2024

Extensions

a(24) corrected by Charles R Greathouse IV, Oct 05 2012
Showing 1-5 of 5 results.