%I #47 Sep 08 2022 08:45:08
%S 4,22,94,364,1336,4738,16402,55768,186988,620014,2037190,6643012,
%T 21523360,69353050,222408058,710270896,2259952852,7167279046,
%U 22664098606,71479080220,224897593864,706073841202,2212364702434,6919523643784,21605859540796,67359444450718
%N a(n) = ((2n+1)*3^n - 1)/2.
%C Sequence corresponds to the maximum chain length of a variant of the classical puzzle whereby, under agreed terms, a ringed golden chain asset of a(n) links, when judiciously fragmented into n opened links (through n cuts) and n pieces of lengths (2n+1), (2n+1)*3, (2n+1)*3^2, ..., (2n+1)*3^(n-1), may be used to sequentially settle for payment equivalent up to a(n)-link cost, a link-cost at a time, with swapping allowed with identical fragments owned by the creditor.
%C a(n) = the difference of the sum of the terms in row(n) and row(n-1) in a triangle with first column T(n-1,0) = n-1 and T(i,j) = T(i-1,j-1) + T(i,j-1) + T(i+1,j-1). - _J. M. Bergot_, Jul 05 2018
%H G. C. Greubel, <a href="/A079272/b079272.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (7,-15,9).
%F From _Colin Barker_, Jul 28 2012: (Start)
%F a(n) = 7*a(n-1) - 15*a(n-2) + 9*a(n-3).
%F G.f.: 2*x*(2-3*x)/((1-x)*(1-3*x)^2). (End)
%F a(n) = f^n(n) with f(x) = 3*x+1 = A016777(x). - _Glen Gilchrist_, Apr 10 2019
%F E.g.f.: ((1+3*x)*sinh(x) + 3*x*cosh(x))*exp(2*x). - _G. C. Greubel_, Apr 14 2019
%e For instance, the 4 fragmented chains of original length a(4) = 364 into
%e .
%e 1 + 9 + 1
%e + +
%e 243 27
%e + +
%e 1 + 81 + 1
%e .
%e when swapped with identical fragments owned by the creditor, enable the sequential payment, a link-cost at a time, for an expense up to 364 link-costs.
%p a:=n->sum (3^j*n^binomial(j,n),j=0..n): seq(a(n),n=1..25); # _Zerinvary Lajos_, Apr 18 2009
%t Rest@ CoefficientList[Series[2x(2-3x)/((1-x)(1-3x)^2), {x, 0, 25}], x] (* _Michael De Vlieger_, Jul 06 2018 *)
%o (Magma) [((2*n+1)*3^n - 1)/2: n in [1..25]]; // _Vincenzo Librandi_, Jul 07 2018
%o (PARI) vector(25, n, ((2*n+1)*3^n - 1)/2) \\ _G. C. Greubel_, Apr 14 2019
%o (Sage) [((2*n+1)*3^n - 1)/2 for n in (1..25)] # _G. C. Greubel_, Apr 14 2019
%Y Cf. A014915, A016777, A027261, A064017.
%K nonn,easy
%O 1,1
%A _Lekraj Beedassy_, Feb 06 2003
%E More terms from _Michel ten Voorde_, Jun 20 2003