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.

A152041 a(n) = A008893(n)/2.

Original entry on oeis.org

0, 4, 33, 129, 355, 795, 1554, 2758, 4554, 7110, 10615, 15279, 21333, 29029, 38640, 50460, 64804, 82008, 102429, 126445, 154455, 186879, 224158, 266754, 315150, 369850, 431379, 500283, 577129, 662505, 757020, 861304, 976008, 1101804, 1239385, 1389465, 1552779
Offset: 0

Views

Author

M. F. Hasler, Sep 15 2009

Keywords

Crossrefs

Cf. A008893.

Programs

  • Mathematica
    Table[n(n+1)(7n^2+7n+2)/8,{n,0,40}] (* or *) LinearRecurrence[ {5,-10,10,-5,1},{0,4,33,129,355},40] (* Harvey P. Dale, Jul 20 2011 *)
  • Maxima
    A152041(n):=n*(n+1)*(7*n^2+7*n+2)/8$
    makelist(A152041(n),n,0,30); /* Martin Ettl, Nov 03 2012 */

Formula

a(n) = n*(n+1)*(7*n^2+7*n+2)/8.
G.f.: -x*(4*x^2+13*x+4)/(x-1)^5.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). - Harvey P. Dale, Jul 20 2011
E.g.f.: x*(2 + x)*(16 + 42*x + 7*x^2)*exp(x)/8. - Elmo R. Oliveira, Aug 15 2025

Extensions

Extended and edited by Nathaniel Johnston, May 05 2011

A045949 Number of equilateral triangles formed out of matches that can be found in a hexagonal chunk of side length n in hexagonal array of matchsticks.

Original entry on oeis.org

0, 6, 38, 116, 262, 496, 840, 1314, 1940, 2738, 3730, 4936, 6378, 8076, 10052, 12326, 14920, 17854, 21150, 24828, 28910, 33416, 38368, 43786, 49692, 56106, 63050, 70544, 78610, 87268, 96540, 106446, 117008, 128246, 140182, 152836, 166230, 180384, 195320, 211058
Offset: 0

Views

Author

Keywords

Crossrefs

See A008893 for a related sequence.
For hexagons, the number of matches required is A045945, the number of size=1 triangles is A033581, the larger triangles is A307253 and the total number is A045949. For the analogs for triangles see A045943 and for stars see A045946. - John King, Apr 05 2019

Programs

  • GAP
    List([0..40], n-> (28*n^3 +18*n^2 +4*n -1 +(-1)^n)/8); # G. C. Greubel, Apr 05 2019
  • Magma
    [(28*n^3 +18*n^2 +4*n -1 +(-1)^n)/8: n in [0..40]]; // G. C. Greubel, Apr 05 2019
    
  • Mathematica
    LinearRecurrence[{3,-2,-2,3,-1},{0,6,38,116,262},40] (* or *) CoefficientList[Series[(2*x*(x*(x+2)*(x+5)+3))/((x-1)^4*(x+1)),{x,0,40}],x] (* Harvey P. Dale, Jun 11 2011 *)
  • Maxima
    A045949(n):=floor(n*(14*n^2+9*n+2)/4)$
    makelist(A045949(n),n,0,30); /* Martin Ettl, Nov 03 2012 */
    
  • PARI
    {a(n) = (28*n^3 +18*n^2 +4*n -1 +(-1)^n)/8}; \\ G. C. Greubel, Apr 05 2019
    
  • R
    floor(1:25*(14*(1:25)^2+9*(1:25)+2)/4) # Christian N. K. Anderson, Apr 27 2013
    
  • Sage
    [(28*n^3 +18*n^2 +4*n -1 +(-1)^n)/8 for n in (0..40)] # G. C. Greubel, Apr 05 2019
    

Formula

a(n) = floor(n*(14*n^2 + 9*n + 2)/4).
From R. J. Mathar, Sep 03 2010: (Start)
a(n) = +3*a(n-1) -2*a(n-2) -2*a(n-3) +3*a(n-4) -a(n-5).
G.f.: 2*x*(3+10*x+7*x^2+x^3) / ( (1+x)*(1-x)^4 ).
a(n) = (28*n^3 + 18*n^2 + 4*n - 1 + (-1)^n)/8. (End)
a(n) = A033581(n) + A307253(n). - John King, Apr 04 2019
E.g.f.: (x*(25 + 51*x + 14*x^2)*exp(x) - sinh(x))/4. - G. C. Greubel, Apr 05 2019

Extensions

Edited by N. J. A. Sloane, May 29 2012

A339483 Number of regular polygons that can be drawn with vertices on a centered hexagonal grid with side length n.

Original entry on oeis.org

0, 9, 75, 294, 810, 1815, 3549, 6300, 10404, 16245, 24255, 34914, 48750, 66339, 88305, 115320, 148104, 187425, 234099, 288990, 353010, 427119, 512325, 609684, 720300, 845325, 985959, 1143450, 1319094, 1514235, 1730265, 1968624, 2230800, 2518329, 2832795
Offset: 0

Views

Author

Peter Kagey, Dec 06 2020

Keywords

Comments

The only regular polygons that can be drawn with vertices on the centered hexagonal grid are equilateral triangles and regular hexagons.

Examples

			There are a(2) = 75 regular polygons that can be drawn on the centered hexagonal grid with side length 2: A000537(2) = 9 regular hexagons and A008893(n) = 66 equilateral triangles.
The nine hexagons are:
    * . *       . * .       * * .
   . . . .     * . . *     * . * .
  * . . . *   . . . . .   . * * . .
   . . . .     * . . *     . . . .
    * . *       . * .       . . .
      1           1           7
which are marked with the number of ways to draw the hexagons up to translation.
The 66 equilateral triangles are:
    * . .       * . .       * . .       * . *       * . .       . . .
   * * . .     . . * .     . . . .     . . . .     . . . .     * . . *
  . . . . .   . * . . .   . . . * .   . . * . .   . . . . *   . . . . .
   . . . .     . . . .     * . . .     . . . .     . . . .     . . . .
    . . .       . . .       . . .       . . .       * . .       . * .
     24          14          12          12           2           2
which are marked with the number of ways to draw the triangles up to translation and dihedral action of the hexagon.
		

Crossrefs

Cf. A000537 (regular hexagons), A008893 (equilateral triangles).
Cf. A338323 (cubic grid).

Programs

  • Mathematica
    a[n_] := n*(n+1)*(2*n+1)^2/2; Array[a, 35, 0] (* Amiram Eldar, Jun 20 2025 *)

Formula

a(n) = A000537(n) + A008893(n).
a(n) = (1/2)*(n+1)*n*(2*n+1)^2.
a(n) = 3*A180324(n).
Sum_{n>=1} 1/a(n) = 10 - Pi^2 (A348670). - Amiram Eldar, Jun 20 2025
From Elmo R. Oliveira, Aug 20 2025: (Start)
G.f.: -3*x*(x + 3)*(3*x + 1)/(x - 1)^5.
E.g.f.: exp(x)*x*(2 + x)*(9 + 24*x + 4*x^2)/2.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
a(n) = A185096(n)/4 = A322677(n)/32. (End)

A239698 Number of equilateral triangles, distinct up to congruence, on a centered hexagonal grid of size n.

Original entry on oeis.org

0, 2, 6, 11, 18, 25, 35, 45, 56, 69, 83, 97, 115, 131, 150, 169, 189, 212, 234, 258, 284
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.

Examples

			For n = 2 the two kinds of non-congruent equilateral triangles are the following:
/. *     * .
. * *   . . *
\. .     * .
		

Crossrefs

Cf. A008893.

Extensions

a(7) from Martin Renner, May 31 2014
a(8)-a(21) from Giovanni Resta, May 31 2014

A350547 Maximum size of a set of points taken from a hexagonal section of a hexagonal grid with side length n such that no three selected points form an equilateral triangle.

Original entry on oeis.org

1, 4, 9, 15, 22, 28, 36
Offset: 0

Views

Author

Zachary DeStefano, Jan 06 2022

Keywords

Comments

The hexagon with side length n has n+1 points along each edge and contains a total of A003215(n) points.
The following lower bounds are known:
a(7) >= 44;
a(8) >= 52;
a(9) >= 60.
All currently known values and lower bounds can be achieved by a configuration with reflective symmetry.

Examples

			For n = 4 the a(4) = 22 solution, unique up to rotation, is:
.
      o x x o x
     x x o o o x
    x o o o o x o
   o o o o o o x x
  x o o o o o o o x
   x x o o o o o o
    o x o o o o x
     x o o o x x
      x o x x o
.
		

Crossrefs

Showing 1-5 of 5 results.