OFFSET
0,3
COMMENTS
Inspired by A264788, but counting on petals of the Flower of Life instead of circles. For n >= 3, the second differences seem to be cyclic of 6, 12, 0.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Crystalinks, Flower of Life
Kival Ngaokrajang, Illustration of initial terms, For n = 11
Index entries for linear recurrences with constant coefficients, signature (2,-1,1,-2,1).
FORMULA
From Colin Barker, Dec 13 2015: (Start)
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5) for n>5.
G.f.: x*(1+5*x+6*x^2+11*x^3-5*x^4) / ((1-x)^3*(1+x+x^2)).
(End)
MATHEMATICA
CoefficientList[Series[x (1 + 5 x + 6 x^2 + 11 x^3 - 5 x^4)/((1 - x)^3 (1 + x + x^2)), {x, 0, 50}], x] (* Vincenzo Librandi, Dec 14 2015 *)
LinearRecurrence[{2, -1, 1, -2, 1}, {0, 1, 7, 19, 43, 67}, 50] (* Harvey P. Dale, Aug 26 2024 *)
PROG
(PARI) { a = 7; d1 = 6; print1("0, 1, ", a, ", "); for(n = 3, 100, if (Mod(n, 3) == 0, d2 = 6); if (Mod(n, 3) == 1, d2 = 12); if (Mod(n, 3) == 2, d2 = 0); d1 = d1 + d2; a = a + d1; print1(a, ", "))}
(PARI) concat(0, Vec(x*(1+5*x+6*x^2+11*x^3-5*x^4) / ((1-x)^3*(1+x+x^2)) + O(x^100))) \\ Colin Barker, Dec 13 2015
(Magma) I:=[0, 1, 7, 19, 43, 67]; [n le 6 select I[n] else 2*Self(n-1)-Self(n-2)+Self(n-3)-2*Self(n-4)+Self(n-5): n in [1..60]]; // Vincenzo Librandi, Dec 14 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Kival Ngaokrajang, Dec 13 2015
STATUS
approved