%I #54 Feb 28 2024 12:01:20
%S 1,4,11,30,85,248,735,2194,6569,19692,59059,177158,531453,1594336,
%T 4782983,14348922,43046737,129140180,387420507,1162261486,3486784421,
%U 10460353224,31381059631,94143178850,282429536505,847288609468
%N a(n) = 3^n + n.
%C This sequence also describes the total number of moves solving (non-optimally) the [RED ; NEUTRAL ; NEUTRAL] or [NEUTRAL ; NEUTRAL ; BLUE] pre-colored Magnetic Tower of Hanoi puzzle (see the "CROSSREFS" in A183121). For other Magnetic Tower of Hanoi related sequences, cf. A183111 - A183125.
%C Form an infinite array with m(0,k) = 2*k+1 and m(n,k) = Sum_{r=0..n-1} m(r,k) + Sum_{c=0..k-1} m(n,c), being the sum of the terms above m(n,k) plus those terms to the left of m(n,k). The first row is A005408. The second row is A033484. The first column is A011782. The sum of the terms in the n-th antidiagonal is a(n). - _J. M. Bergot_, Jun 07 2013
%H G. C. Greubel, <a href="/A104743/b104743.txt">Table of n, a(n) for n = 0..1000</a>
%H Uri Levy, <a href="http://arxiv.org/abs/1003.0225">The Magnetic Tower of Hanoi</a>, arXiv:1003.0225 [math.CO], 2010.
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (5,-7,3).
%F a(n) = n + 3^n.
%F From _Colin Barker_, Jan 25 2012: (Start)
%F a(n) = 5*a(n-1) - 7*a(n-2) + 3*a(n-3).
%F G.f.: (1+x)*(1-2*x) / ((1-3*x)*(1-x)^2). (End)
%F E.g.f.: x*exp(x) + exp(3*x). - _G. C. Greubel_, May 21 2019
%t Table[3^n +n, {n,0,40}] (* _Vladimir Joseph Stephan Orlovsky_, Jan 18 2009, modified by _G. C. Greubel_, May 21 2019 *)
%t LinearRecurrence[{5,-7,3},{1,4,11},30] (* _Harvey P. Dale_, Aug 01 2020 *)
%o (PARI) {a(n) = 3^n + n}; \\ _G. C. Greubel_, May 21 2019
%o (Magma) [3^n +n: n in [0..40]]; // _G. C. Greubel_, May 21 2019
%o (Sage) [3^n +n for n in (0..40)] # _G. C. Greubel_, May 21 2019
%o (GAP) List([0..40], n-> 3^n +n ) # _G. C. Greubel_, May 21 2019
%Y Cf. A103537.
%K nonn,easy
%O 0,2
%A _Zak Seidov_, Mar 23 2005
%E More terms from _Vladimir Joseph Stephan Orlovsky_, Jan 18 2009
|