login
Hexagonal spiral constructed on the nodes of the triangular net in which each new term is the sum of its neighbors.
4

%I #32 Nov 24 2016 09:42:04

%S 1,1,2,3,4,5,7,8,9,12,14,19,22,29,33,42,47,59,74,82,99,108,129,155,

%T 169,202,243,265,316,378,411,486,575,622,728,861,1017,1099,1280,1487,

%U 1595,1832,2116,2440,2609,2980,3425,3933,4198,4779,5473,6262,6673,7570,8631,9828,10450,11800,13389,15267,17383

%N Hexagonal spiral constructed on the nodes of the triangular net in which each new term is the sum of its neighbors.

%C 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.

%H JungHwan Min, <a href="/A278181/b278181.txt">Table of n, a(n) for n = 0..10000</a>

%e Illustration of initial terms as a spiral:

%e .

%e . 22 - 19 - 14

%e . / \

%e . 29 3 - 2 12

%e . / / \ \

%e . 33 4 1 - 1 9

%e . \ \ /

%e . 42 5 - 7 - 8

%e . \

%e . 47 - 59 - 74

%e .

%e a(16) = 47 because the sum of its two neighbors is 42 + 5 = 47.

%e a(17) = 59 because the sum of its three neighbors is 47 + 5 + 7 = 59.

%e a(18) = 74 because the sum of its three neighbors is 59 + 7 + 8 = 74.

%e a(19) = 82 because the sum of its two neighbors is 74 + 8 = 82.

%t 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 *)

%Y Cf. A047931, A064642, A122479, A141481, A274821, A274921, A275606, A275610.

%K nonn

%O 0,3

%A _Omar E. Pol_, Nov 14 2016