login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A278181
Hexagonal spiral constructed on the nodes of the triangular net in which each new term is the sum of its neighbors.
4
1, 1, 2, 3, 4, 5, 7, 8, 9, 12, 14, 19, 22, 29, 33, 42, 47, 59, 74, 82, 99, 108, 129, 155, 169, 202, 243, 265, 316, 378, 411, 486, 575, 622, 728, 861, 1017, 1099, 1280, 1487, 1595, 1832, 2116, 2440, 2609, 2980, 3425, 3933, 4198, 4779, 5473, 6262, 6673, 7570, 8631, 9828, 10450, 11800, 13389, 15267, 17383
OFFSET
0,3
COMMENTS
To evaluate a(n) consider the neighbors of a(n) that are present in the spiral when a(n) should be a new term in the spiral.
LINKS
EXAMPLE
Illustration of initial terms as a spiral:
.
. 22 - 19 - 14
. / \
. 29 3 - 2 12
. / / \ \
. 33 4 1 - 1 9
. \ \ /
. 42 5 - 7 - 8
. \
. 47 - 59 - 74
.
a(16) = 47 because the sum of its two neighbors is 42 + 5 = 47.
a(17) = 59 because the sum of its three neighbors is 47 + 5 + 7 = 59.
a(18) = 74 because the sum of its three neighbors is 59 + 7 + 8 = 74.
a(19) = 82 because the sum of its two neighbors is 74 + 8 = 82.
MATHEMATICA
A278181[0] = A278181[1] = 1; A278181[n_] := A278181[n] = With[{lev = Ceiling[1/6 (-3 + Sqrt[3] Sqrt[3 + 4 n])]}, With[{pos = 3 lev (lev - 1) + (n - 3 lev (1 + lev))/lev*(lev - 1)}, A278181[n - 1] + A278181[Ceiling[pos]] + If[Mod[n, lev] == 0 || n - 3 lev (lev - 1) == 1, 0, A278181[Floor[pos]]] + If[3 lev (1 + lev) == n, A278181[n - 6 lev + 1], 0]]]; Array[A278181, 61, 0] (* JungHwan Min, Nov 21 2016 *)
KEYWORD
nonn
AUTHOR
Omar E. Pol, Nov 14 2016
STATUS
approved