OFFSET
1,2
COMMENTS
Intersection of A000384 and A008588. Their indices are given by A047238. - Michel Marcus, Feb 27 2014
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5), with a(1)=0, a(2)=6, a(3)=66, a(4)=120, a(5)=276. - Harvey P. Dale, Aug 19 2011
a(n) = 3/2*(-1)^n(-4 n+(-1)^n*(6*n(2*n-5)+19)+5). - Harvey P. Dale, Aug 19 2011
G.f.: 6*x^2*(1+10*x+7*x^2+6*x^3)/((1-x)^3*(1+x)^2). - Harvey P. Dale, Aug 19 2011
MATHEMATICA
Select[Table[n(2n-1), {n, 0, 250}], Divisible[#, 6]&] (* or *) LinearRecurrence[ {1, 2, -2, -1, 1}, {0, 6, 66, 120, 276}, 84] (* Harvey P. Dale, Aug 19 2011 *)
PROG
(PARI) isok(n) = ispolygonal(n, 6) && !(n % 6); \\ Michel Marcus, Feb 27 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), Apr 29 2006
STATUS
approved