login
a(n) = 9*3^n - 15.
1

%I #38 Nov 26 2025 17:15:33

%S 12,66,228,714,2172,6546,19668,59034,177132,531426,1594308,4782954,

%T 14348892,43046706,129140148,387420474,1162261452,3486784386,

%U 10460353188,31381059594,94143178812,282429536466,847288609428,2541865828314,7625597484972,22876792454946

%N a(n) = 9*3^n - 15.

%C a(n) is the first Zagreb index of the Hanoi graph H[n].

%C The first Zagreb index of a simple connected graph is the sum of the squared degrees of its vertices. Alternately, it is the sum of the degree sums d(i)+d(j) over all edges ij of the graph.

%C The M-polynomial of the Hanoi graph H[n] is M(H[n],x,y) = 6*x^2*y^3 + (3/2)*(3^n - 5)*x^3*y^3.

%H Emeric Deutsch and Sandi Klavzar, <a href="http://dx.doi.org/10.22052/ijmc.2015.10106">M-polynomial and degree-based topological indices</a>, Iranian J. Math. Chemistry, 6, No. 2, 2015, 93-102.

%H Ivan Gutman and Kinkar C. Das, <a href="https://match.pmf.kg.ac.rs/electronic_versions/Match50/match50_83-92.pdf">The first Zagreb index 30 years after</a>, MATCH Commun. Math. Comput. Chem. (2004) Vol. 50, 83-92.

%H El-Mehdi Mehiri, <a href="https://arxiv.org/abs/2511.12587">Explicit M-Polynomial and Degree-Based Topological Indices of Generalized Hanoi Graphs</a>, arXiv:2511.12587 [math.CO], 2025. See p. 30, Table 12.

%H Eric. W. Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/HanoiGraph.html">Hanoi Graph</a>.

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (4,-3).

%F O.g.f.: 6*x*(2 + 3*x)/((1 - x)*(1 - 3*x)).

%F E.g.f.: 3*(1 - exp(x))*(2 - 3*exp(x) - 3*exp(2*x)). - _Bruno Berselli_, Nov 14 2016

%F a(n) = 3*A168613(n+1). - _R. J. Mathar_, Apr 07 2022

%p seq(9*3^n-15, n = 1..30);

%t Table[9 3^n - 15, {n, 1, 30}] (* _Bruno Berselli_, Nov 14 2016 *)

%o (Magma) [9*3^n-15: n in [1..30]]; // _Bruno Berselli_, Nov 14 2016

%o (PARI) a(n)=3^(n+2)-15 \\ _Charles R Greathouse IV_, Nov 14 2016

%Y Cf. A277105.

%K nonn,easy

%O 1,1

%A _Emeric Deutsch_, Nov 05 2016