A117794 Hexagonal numbers divisible by 6.
0, 6, 66, 120, 276, 378, 630, 780, 1128, 1326, 1770, 2016, 2556, 2850, 3486, 3828, 4560, 4950, 5778, 6216, 7140, 7626, 8646, 9180, 10296, 10878, 12090, 12720, 14028, 14706, 16110, 16836, 18336, 19110, 20706, 21528, 23220, 24090, 25878, 26796
Offset: 1
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).
Programs
-
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 *)
-
PARI
isok(n) = ispolygonal(n, 6) && !(n % 6); \\ Michel Marcus, Feb 27 2014
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
Comments