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.

This page as a plain text file.
%I A373584 #42 Aug 31 2025 10:49:37
%S A373584 1,7,13,19,31,49,67,85,109,139,169,199,235,277,319,361,409,463,517,
%T A373584 571,631,697,763,829,901,979,1057,1135,1219,1309,1399,1489,1585,1687,
%U A373584 1789,1891,1999,2113,2227,2341,2461,2587,2713,2839,2971,3109,3247,3385,3529
%N A373584 a(n) is equal to the number of shaded cells in a regular hexagon with side n drawn on a hexagonal grid.
%C A373584 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).
%H A373584 Paolo Xausa, <a href="/A373584/b373584.txt">Table of n, a(n) for n = 1..10000</a>
%H A373584 Nicolay Avilov, <a href="/A373584/a373584.jpg">Members of the sequence a(1) - a(7)</a>.
%H A373584 Nicolay Avilov, <a href="https://www.diofant.ru/problem/4471/">Problem 2663. Snowflakes</a> (in Russian).
%H A373584 Nicolay Avilov, <a href="/A373584/a373584_1.jpg">Illustration a(13) and a(16)</a>
%H A373584 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (3,-4,4,-3,1).
%F A373584 a(n+4) = a(n) + 12*n + 18.
%F A373584 a(n) = 6*ceiling(n*(n - 1)/4) + 1.
%F A373584 a(n) = A003215(n) - 6*A011848(n+1).
%F A373584 a(n) = 6*A054925(n) + 1.
%F A373584 G.f.: (1 + 4*x - 4*x^2 + 4*x^3 + x^4)/((1 - x)^3*(1 + x^2)). - _Stefano Spezia_, Jun 11 2024
%F A373584 E.g.f.: (exp(x)*(5 + 6*x + 3*x^2) - 3*cos(x) + 3*sin(x))/2. - _Stefano Spezia_, Aug 31 2025
%e A373584 a(3) = 19 - 6*1 = 13;
%e A373584 a(4) = 37 - 6*3 = 19.
%e A373584                                                    o . o . o
%e A373584                                  o . . o          . o . . o .
%e A373584                    o . o        . o . o .        o . o . o . o
%e A373584          o o      . o o .      . . o o . .      . . . o o . . .
%e A373584    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
%e A373584          o o      . o o .      . . o o . .      . . . o o . . .
%e A373584                    o . o        . o . o .        o . o . o . o
%e A373584                                  o . . o          . o . . o .
%e A373584                                                    o . o . o
%e A373584    1      7         13             19                 31
%t A373584 Table[6*Ceiling[n*(n - 1)/4] + 1, {n, 100}] (* _Paolo Xausa_, Jul 01 2024 *)
%Y A373584 Cf. A003215, A011848, A054925.
%K A373584 nonn,easy,changed
%O A373584 1,2
%A A373584 _Nicolay Avilov_, Jun 10 2024