%I #29 Jul 29 2023 07:04:56
%S 0,4,9,40,120,390,1176,3536,10395,30260,87120,248844,705744,1989820,
%T 5581485,15586720,43356936,120187026,332134440,915304520,2516113215,
%U 6900949484,18888143904,51599794200,140718765600,383142771700,1041660829521,2828107288216,7668512468760,20768716848030,56185646831160,151840963183424,409947452576739,1105779284582180,2980113861417840
%N a(n) is the Wiener index of the Lucas cube L_n.
%C The Lucas cube L_n is defined in the Klavzar and Mollard reference (as Lambda_n).
%H Vincenzo Librandi, <a href="/A238420/b238420.txt">Table of n, a(n) for n = 1..1000</a>
%H S. Klavzar, M. Mollard, <a href="http://match.pmf.kg.ac.rs/electronic_versions/Match68/n1/match68n1_311-324.pdf">Wiener index and Hosoya polynomial of Fibonacci and Lucas cubes</a>, MATCH Commun. Math. Comput. Chem., 68, 2012, 311-324.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/LucasCubeGraph.html">Lucas Cube Graph</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/WienerIndex.html">Wiener Index</a>
%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (4,0,-10,0,4,-1).
%F a(n) = n * F(n-1) * F(n+1) where F(n)=A000045(n) are the Fibonacci numbers.
%F a(n) = (1/5) * ((4n+4)*F(2n-2) + (7n+7)*F(2n-1) - 3(n+1)*(-1)^n). - _Ralf Stephan_, Mar 30 2014
%F G.f.: (4*x^3 - 7*x^2 + 4*x)/((x + 1)^2 * (x^2 - 3*x + 1)^2). - _Ralf Stephan_, Mar 30 2014
%e a(2)=4 because the Lucas cube L_2 is the path P_3 having Wiener index 1 + 1 + 2 = 4.
%e a(3)=9 because the Lucas cube L_3 is the star on 4 vertices having Wiener index 1 + 1 + 1 + 2 + 2 + 2 = 9.
%t Table[n Fibonacci[n - 1] Fibonacci[n + 1], {n, 1, 40}] (* _Vincenzo Librandi_, Mar 30 2014 *)
%t Table[(3 (-1)^n + LucasL[2 n]) n/5, {n, 15}] (* _Eric W. Weisstein_, Jul 29 2023 *)
%t LinearRecurrence[{4, 0, -10, 0, 4, -1}, {0, 4, 9, 40, 120, 390}, 20] (* _Eric W. Weisstein_, Jul 29 2023 *)
%t CoefficientList[Series[x (4 - 7 x + 4 x^2)/(1 - 2 x - 2 x^2 + x^3)^2, {x, 0, 20}], x] (* _Eric W. Weisstein_, Jul 29 2023 *)
%o (Magma) [n*Fibonacci(n-1)*Fibonacci(n+1): n in [1..40]]; // _Vincenzo Librandi_, Mar 30 2014
%Y Cf. A000045.
%K nonn,easy
%O 1,2
%A _Emeric Deutsch_, Mar 26 2014