%I #41 Sep 08 2022 08:44:47
%S 1,5,13,28,54,98,171,291,487,806,1324,2164,3525,5729,9297,15072,24418,
%T 39542,64015,103615,167691,271370,439128,710568,1149769,1860413,
%U 3010261,4870756,7881102,12751946,20633139,33385179,54018415,87403694,141422212,228826012
%N a(n) = Lucas(n+4) - (3*n+7).
%C Define a triangle with T(n, 1) = n*(n-1) + 1 and T(n, n) = n for n = 1, 2, 3, ... The interior terms T(r, c) = T(r - 1, c) + T(r - 2, c - 1); this triangle will give the sum of terms in row(n) = a(n). The rows begin 1; 3 2; 7 3 3; 13 6 5 4; 21 13 8 7 5 having row(n) sums 1, 5, 13, 28, 54. - _J. M. Bergot_, Feb 17 2013
%D Wolfdieter Lang in "Applications of Fibonacci Numbers", Vol. 7, p. 235, eds.: G. E. Bergum et al, Kluwer, 1998.
%H Colin Barker, <a href="/A023537/b023537.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3,-2,-1,1).
%F Convolution of natural numbers with Lucas numbers A000204.
%F From _Wolfdieter Lang_: (Start)
%F a(n) = 7*(F(n+1) - 1) + 4*F(n) - 3*n; F(n) = A000045 (Fibonacci);
%F g.f.: x*(1 + 2*x)/((1 - x - x^2)*(1 - x)^2). (End)
%F a(n) - a(n-1) = A101220(3, 1, n). - _Ross La Haye_, May 31 2006
%F a(n+1) - a(n) = A027961(n+1). - _R. J. Mathar_, Feb 21 2013
%F From _Colin Barker_, Mar 11 2017: (Start)
%F a(n) = -4 + (2^(-1 - n)*((1 - sqrt(5))^n*(-15 + 7*sqrt(5)) + (1 + sqrt(5))^n*(15 + 7*sqrt(5)))) / sqrt(5) - 3*(1+n).
%F a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4) for n > 4.
%F (End)
%p with(combinat): L:=n->fibonacci(n+2)-fibonacci(n-2): seq(L(n),n=0..12): seq(L(n+4)-3*n-7,n=1..40); # _Emeric Deutsch_, Aug 08 2005
%t Table[LucasL[n + 4] - (3n + 7), {n, 40}] (* _Alonso del Arte_, Feb 17 2013 *)
%o (Magma) [Lucas(n+4) -(3*n+7): n in [1..40]]; // _Vincenzo Librandi_, Apr 16 2011
%o (PARI) Vec(x*(1+2*x)/((1-x-x^2)*(1-x)^2) + O(x^40)) \\ _Colin Barker_, Mar 11 2017
%o (Sage) [lucas_number2(n+4, 1, -1) -(3*n+7) for n in (1..40)] # _G. C. Greubel_, Jun 01 2019
%o (GAP) List([1..40], n-> Lucas(1, -1, n+4)[2] -(3*n+7) ) # _G. C. Greubel_, Jun 01 2019
%o (Scala) def lucas(n: BigInt): BigInt = {
%o val zero = BigInt(0)
%o def fibTail(n: BigInt, a: BigInt, b: BigInt): BigInt = n match {
%o case `zero` => a
%o case _ => fibTail(n - 1, b, a + b)
%o }
%o fibTail(n, 2, 1)
%o }
%o (1 to 40).map(n => lucas(n + 4) - (3 * n + 7)) // _Alonso del Arte_, Oct 20 2019
%Y T(n, n+2), T given by A027960.
%K nonn,easy
%O 1,2
%A _Clark Kimberling_
%E More terms from _Emeric Deutsch_, Aug 08 2005