OFFSET
7,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 7..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,0,0,1,-2,1).
FORMULA
G.f.: 2*x^7/((1-x)^2*(1-x^6)).
a(n) = 2*A008724(n-3). a(n) = 2*a(n-1) - a(n-2) + a(n-6) - 2*a(n-7) + a(n-8). - R. J. Mathar, Jul 26 2010
a(n) = 2*j*(n-3*j-3), where j=floor(n/6). - Jon E. Schoenfield, Dec 20 2013
EXAMPLE
a(7)=2 because the two sets {1 2 3 4 5 7} and {1 3 4 5 6 7} have sum-sets
{2 3 4 5 6 7 8 9 10 11 12 14} and {2 4 5 6 7 8 9 10 11 12 13 14}, respectively and each of these sum-sets has 12 elements.
MATHEMATICA
CoefficientList[Series[2/((1 - x)^2 (1 - x^6)), {x, 0, 100}], x] (* Vincenzo Librandi, Dec 21 2013 *)
PROG
(PARI) lista(n) = {my(x = xx + O(xx^n)); gf = 2*x^7/((1-x)^2*(1-x^6)); for (i=7, n-1, print1(polcoeff(gf, i, xx), ", ")); } \\ - Michel Marcus, Dec 20 2013
(Magma) I:=[2, 4, 6, 8, 10, 12, 16, 20]; [n le 8 select I[n] else 2*Self(n-1)-Self(n-2)+Self(n-6)-2*Self(n-7)+Self(n-8): n in [1..70]]; // Vincenzo Librandi, Dec 21 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
David S. Newman, Dec 10 2005
EXTENSIONS
More terms from Jon E. Schoenfield, Dec 20 2013
STATUS
approved