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.

A373584 a(n) is equal to the number of shaded cells in a regular hexagon with side n drawn on a hexagonal grid.

Original entry on oeis.org

1, 7, 13, 19, 31, 49, 67, 85, 109, 139, 169, 199, 235, 277, 319, 361, 409, 463, 517, 571, 631, 697, 763, 829, 901, 979, 1057, 1135, 1219, 1309, 1399, 1489, 1585, 1687, 1789, 1891, 1999, 2113, 2227, 2341, 2461, 2587, 2713, 2839, 2971, 3109, 3247, 3385, 3529
Offset: 1

Views

Author

Nicolay Avilov, Jun 10 2024

Keywords

Comments

On a hexagonal grid, cells are colored as follows: one cell and all those located along three straight lines passing through the center of the original cell and forming six 60° angles between each other are painted. In each of these corners, cells are painted over so that a V-shaped arrangement of cells repeats ad infinitum. The number of shaded cells in regular hexagons centered on the starting cell determines the sequence a(n).

Examples

			a(3) = 19 - 6*1 = 13;
a(4) = 37 - 6*3 = 19.
                                                   o . o . o
                                 o . . o          . o . . o .
                   o . o        . o . o .        o . o . o . o
         o o      . o o .      . . o o . .      . . . o o . . .
   o    o o o    o o o o o    o o o o o o o    o o o o o o o o o
         o o      . o o .      . . o o . .      . . . o o . . .
                   o . o        . o . o .        o . o . o . o
                                 o . . o          . o . . o .
                                                   o . o . o
   1      7         13             19                 31
		

Crossrefs

Programs

  • Mathematica
    Table[6*Ceiling[n*(n - 1)/4] + 1, {n, 100}] (* Paolo Xausa, Jul 01 2024 *)

Formula

a(n+4) = a(n) + 12*n + 18.
a(n) = 6*ceiling(n*(n - 1)/4) + 1.
a(n) = A003215(n) - 6*A011848(n+1).
a(n) = 6*A054925(n) + 1.
G.f.: (1 + 4*x - 4*x^2 + 4*x^3 + x^4)/((1 - x)^3*(1 + x^2)). - Stefano Spezia, Jun 11 2024
E.g.f.: (exp(x)*(5 + 6*x + 3*x^2) - 3*cos(x) + 3*sin(x))/2. - Stefano Spezia, Aug 31 2025