Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #38 Jun 27 2023 11:10:46
%S 1,2,8,26,80,242,728,2186,6560,19682,59048,177146,531440,1594322,
%T 4782968,14348906,43046720,129140162,387420488,1162261466,3486784400,
%U 10460353202,31381059608,94143178826,282429536480,847288609442
%N a(n) = 0^n + 3^n - 1.
%C A transform of 3^n under the matrix A103452.
%C a(n) is the number of moves required to solve a Towers of Hanoi puzzle of 3 towers in a line (no direct connection between the two towers on the ends) with n pieces to be moved from one end tower to the other. This is easily proved through demonstration. - _Roderick Kimball_, Nov 22 2015
%H Vincenzo Librandi, <a href="/A103453/b103453.txt">Table of n, a(n) for n = 0..190</a>
%H Steven Schlicker, Roman Vasquez, and Rachel Wofford, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL26/Wofford/wofford4.html">Integer Sequences from Configurations in the Hausdorff Metric Geometry via Edge Covers of Bipartite Graphs</a>, J. Int. Seq. (2023) Vol. 26, Art. 23.6.6.
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (4,-3).
%F G.f.: (1 -2*x +3*x^2)/((1-x)*(1-3*x)).
%F a(n) = Sum_{k=0..n} A103452(n, k)*3^k.
%F a(n) = Sum_{k=0..n} (2*0^(n-k) - 1)*0^(k*(n-k))*3^k.
%F From _G. C. Greubel_, Jun 18 2021: (Start)
%F E.g.f.: 1 - exp(x) + exp(3*x).
%F a(n) = [n=0] + 2*A003462(n). (End)
%t Table[If[n==0, 1, 3^n -1], {n, 0, 30}] (* _G. C. Greubel_, Jun 18 2021 *)
%t LinearRecurrence[{4,-3},{1,2,8},30] (* _Harvey P. Dale_, Feb 13 2022 *)
%o (Magma) [0^n+3^n-1: n in [0..30] ]; // _Vincenzo Librandi_, Apr 30 2011
%o (PARI) a(n) = if(n==0, 1, 3^n-1); \\ _Altug Alkan_, Nov 22 2015
%o (Sage) [3^n -1 +0^n for n in (0..30)] # _G. C. Greubel_, Jun 18 2021
%Y Cf. A103452.
%Y Essentially identical to A024023.
%K easy,nonn
%O 0,2
%A _Paul Barry_, Feb 06 2005