OFFSET
1,1
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Felix Fröhlich, Layers in the rhombille tiling, 2019.
Wikipedia, Rhombille tiling
Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
FORMULA
a(2*n+1) = A008594(n).
a(2*n) = A008588(n+1) for n > 1.
From Colin Barker, Jul 13 2019: (Start)
G.f.: 6*x*(1 + x + x^3 + x^4 - x^5) / ((1 - x)^2*(1 + x)^2).
a(n) = 2*a(n-2) - a(n-4) for n>6.
(End)
EXAMPLE
See illustration in Fröhlich, 2019.
MATHEMATICA
Join[{6, 6}, LinearRecurrence[{0, 2, 0, -1}, {12, 18, 24, 24}, 60]] (* Vincenzo Librandi, Jul 16 2019 *)
PROG
(PARI) a(n) = if(n<3, 6, if(n%2==0, 6*((n+2)/2), 12*((n-1)/2)))
(PARI) Vec(6*x*(1 + x + x^3 + x^4 - x^5) / ((1 - x)^2*(1 + x)^2) + O(x^40)) \\ Colin Barker, Jul 13 2019
(Magma) I:=[6, 6, 12, 18, 24, 24]; [n le 6 select I[n] else 2*Self(n-2)-Self(n-4): n in [1..60]]; // Vincenzo Librandi, Jul 16 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Felix Fröhlich, Jul 13 2019
STATUS
approved