This code-golf challenge will have you computing OEIS sequence A300154.
Consider a spiral on an infinite hexagonal grid. a(n) is the number of cells in the part of the spiral from 1st to n-th cell that are on the same [row*] or diagonal (in any of three directions) as the n-th cell along the spiral, including that cell itself.
(*I have very slightly changed the definition to match the orientation of the GIF below.)
The sequence begins
1, 2, 3, 3, 4, 4, 5, 5, 5, 6, 6, 7, 6, 7, 7, 8, 7, 8, 9, 8, 9, 8, 9, 10, 9, 10, 11, 9, 10, 11, 10, 11, 12, 10, 11, 12, 13, 11, 12, 13, 11, 12, 13, 14, 12, 13, 14, 15, 12, 13, 14, 15, 13, 14, 15, 16, 13, 14, 15, 16, 17, 14
Example
Below is an example of the first fifteen terms of the sequence. On a hexagonal tiling, go in a spiral, and after each step, count the number of cells that you can "see" from that position, including the cell itself.
Challenge
The challenge is simple, write a program that takes a positive integer n
and computes \$A300154(n)\$. Again, this is code-golf so shortest code wins.
(Note: I will also award an additional bounty of 200 rep to the first person who completes this challenge in Hexagony.)