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.

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

This page as a plain text file.
%I A278181 #32 Nov 24 2016 09:42:04
%S A278181 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 A278181 169,202,243,265,316,378,411,486,575,622,728,861,1017,1099,1280,1487,
%U A278181 1595,1832,2116,2440,2609,2980,3425,3933,4198,4779,5473,6262,6673,7570,8631,9828,10450,11800,13389,15267,17383
%N A278181 Hexagonal spiral constructed on the nodes of the triangular net in which each new term is the sum of its neighbors.
%C A278181 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 A278181 JungHwan Min, <a href="/A278181/b278181.txt">Table of n, a(n) for n = 0..10000</a>
%e A278181 Illustration of initial terms as a spiral:
%e A278181 .
%e A278181 .             22 - 19 - 14
%e A278181 .             /          \
%e A278181 .           29    3 - 2   12
%e A278181 .           /    /     \   \
%e A278181 .         33    4   1 - 1   9
%e A278181 .           \    \         /
%e A278181 .           42    5 - 7 - 8
%e A278181 .             \
%e A278181 .             47 - 59 - 74
%e A278181 .
%e A278181 a(16) = 47 because the sum of its two neighbors is 42 + 5 = 47.
%e A278181 a(17) = 59 because the sum of its three neighbors is 47 + 5 + 7 = 59.
%e A278181 a(18) = 74 because the sum of its three neighbors is 59 + 7 + 8 = 74.
%e A278181 a(19) = 82 because the sum of its two neighbors is 74 + 8 = 82.
%t A278181 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 A278181 Cf. A047931, A064642, A122479, A141481, A274821, A274921, A275606, A275610.
%K A278181 nonn
%O A278181 0,3
%A A278181 _Omar E. Pol_, Nov 14 2016