OFFSET
1,1
COMMENTS
Intersection of A000566 and A033991 (even hexagonal numbers divided by 2). - Michel Marcus, Jun 20 2015
LINKS
Colin Barker, Table of n, a(n) for n = 1..158
Index entries for linear recurrences with constant coefficients, signature (2079363,-2079363,1).
FORMULA
G.f.: -9*x*(2*x^2+33189*x+21) / ((x-1)*(x^2-2079362*x+1)).
EXAMPLE
189 is in the sequence because 189 is the 9th heptagonal number, and 2*189 is the 14th hexagonal number.
MATHEMATICA
LinearRecurrence[{2079363, -2079363, 1}, {189, 393298308, 817809556618215}, 20] (* Vincenzo Librandi, Jun 20 2015 *)
PROG
(PARI) Vec(-9*x*(2*x^2+33189*x+21)/((x-1)*(x^2-2079362*x+1)) + O(x^20))
(Magma) I:=[189, 393298308, 817809556618215]; [n le 3 select I[n] else 2079363*Self(n-1)-2079363*Self(n-2)+Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 20 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Colin Barker, Jun 19 2015
STATUS
approved