OFFSET
1,4
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
V. M. Zhuravlev, Horizontally-convex polyiamonds and their generating functions, Mat. Pros. 17 (2013), 107-129 (in Russian). See the sequence d(n).
Index entries for linear recurrences with constant coefficients, signature (2,3,-4,-3,2,4,2,-1).
FORMULA
G.f.: -x^2*(-1+x+2*x^2-2*x^3-x^4+x^6-x^5) / ( (1+x)*(x^7-3*x^6-x^5-x^4+4*x^3-3*x+1) ). - R. J. Mathar, Mar 20 2014
MAPLE
g:=proc(n) option remember; local t1;
t1:=[2, 3, 6, 14, 34, 84, 208, 515];
if n <= 7 then t1[n] else
3*g(n-1)-4*g(n-3)+g(n-4)+g(n-5)+3*g(n-6)-g(n-7); fi; end proc;
[seq(g(n), n=1..32)]; # A238823
d:=proc(n) option remember; global g; local t1;
t1:=[0, 1];
if n <= 2 then t1[n] else
g(n-1)-2*d(n-1)-d(n-2); fi; end proc;
[seq(d(n), n=1..32)]; # A238824
MATHEMATICA
CoefficientList[Series[-x (- 1 + x + 2 x^2 - 2 x^3 - x^4 + x^6 - x^5)/((1 + x) (x^7 - 3 x^6 - x^5 - x^4 + 4 x^3 - 3 x + 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Mar 21 2014 *)
LinearRecurrence[{2, 3, -4, -3, 2, 4, 2, -1}, {0, 1, 1, 3, 7, 17, 43, 105}, 40] (* Harvey P. Dale, Dec 26 2023 *)
PROG
(Magma) m:=40; R<x>:=LaurentSeriesRing(RationalField(), m); [0] cat Coefficients(R! -x^2*(-1+x+2*x^2-2*x^3-x^4+x^6-x^5) / ( (1+x)*(x^7-3*x^6-x^5-x^4+4*x^3-3*x+1))); // Vincenzo Librandi, Mar 21 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Mar 08 2014
STATUS
approved