OFFSET
1,1
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..100
Eric Weisstein's World of Mathematics, Apollonian Network
Eric Weisstein's World of Mathematics, Wiener Index
Index entries for linear recurrences with constant coefficients, signature (23, -174, 448, -29, -1221, 2088, -4050, 2916).
FORMULA
a(n) = Sum_{k=1..1+floor(2*n/3)} k*A289722(n,k).
a(n) = 23*a(n-1) - 174*a(n-2) + 448*a(n-3) - 29*a(n-4) - 1221*a(n-5) + 2088*a(n-6) - 4050*a(n-7) + 2916*a(n-8).
G.f.: x*(6 - 111*x + 627*x^2 - 741*x^3 - 1497*x^4 + 2862*x^5 - 5670*x^6 + 8748*x^7)/((1 - x)*(1 - 3*x)^2*(1 - 9*x)^2*(1 + 2*x)*(1 + 2*x^2)).
MATHEMATICA
(* Start from Eric W. Weisstein, Sep 07 2017 *)
Table[(6655 + 31 (-1)^n 2^(n + 2) + 5 3^(1 + 2 n) (24 + 11 n) + 3^(n + 1) (1197 + 55 n) + 5 2^(5 + n/2) Cos[n Pi/2] - 155 2^((3 + n)/2) Sin[n Pi/2])/3630, {n, 20}]
LinearRecurrence[{23, -174, 448, -29, -1221, 2088, -4050, 2916}, {6, 27, 204, 1941, 19572, 198567, 1999056, 19931337}, 20]
CoefficientList[Series[(6 - 111 x + 627 x^2 - 741 x^3 - 1497 x^4 + 2862 x^5 - 5670 x^6 + 8748 x^7)/((1 - x) (1 - 3 x)^2 (1 - 9 x)^2 (1 + 2 x) (1 + 2 x^2)), {x, 0, 20}], x]
(* End *)
PROG
(PARI)
R(dp, peq, p1, p2, x) = {[3*(dp - x + peq^2 + (2+7*x)*p1^2 + (7+2*x)*p2^2 + (4+2*x)*peq*p1 + 6*peq*p2 + 2*(4+5*x)*p1*p2 + x*(peq+3*p1+3*p2)), x*(1+3*p1), 2*(p1+p2), peq+p2]}
A(n, x) = {my(v=[6*x, x, 0, 0, x]); for(i=2, n, v=R(v[1], v[2], v[3], v[4], x)); v[1]}
Wiener(dp)=sum(i=1, poldegree(dp), i*polcoeff(dp, i));
a(n) = Wiener(A(n, x));
CROSSREFS
KEYWORD
nonn
AUTHOR
Andrew Howroyd, Sep 02 2017
STATUS
approved