OFFSET
1,1
COMMENTS
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.
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
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (7,-15,9).
FORMULA
From Colin Barker, Jul 28 2012: (Start)
a(n) = 7*a(n-1) - 15*a(n-2) + 9*a(n-3).
G.f.: 2*x*(2-3*x)/((1-x)*(1-3*x)^2). (End)
a(n) = f^n(n) with f(x) = 3*x+1 = A016777(x). - Glen Gilchrist, Apr 10 2019
E.g.f.: ((1+3*x)*sinh(x) + 3*x*cosh(x))*exp(2*x). - G. C. Greubel, Apr 14 2019
EXAMPLE
For instance, the 4 fragmented chains of original length a(4) = 364 into
.
1 + 9 + 1
+ +
243 27
+ +
1 + 81 + 1
.
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.
MAPLE
a:=n->sum (3^j*n^binomial(j, n), j=0..n): seq(a(n), n=1..25); # Zerinvary Lajos, Apr 18 2009
MATHEMATICA
Rest@ CoefficientList[Series[2x(2-3x)/((1-x)(1-3x)^2), {x, 0, 25}], x] (* Michael De Vlieger, Jul 06 2018 *)
PROG
(Magma) [((2*n+1)*3^n - 1)/2: n in [1..25]]; // Vincenzo Librandi, Jul 07 2018
(PARI) vector(25, n, ((2*n+1)*3^n - 1)/2) \\ G. C. Greubel, Apr 14 2019
(Sage) [((2*n+1)*3^n - 1)/2 for n in (1..25)] # G. C. Greubel, Apr 14 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Lekraj Beedassy, Feb 06 2003
EXTENSIONS
More terms from Michel ten Voorde, Jun 20 2003
STATUS
approved