OFFSET
1,1
COMMENTS
For k there is always a recurrence.
For n=1, k(1,1) = 0, k(2,1) = 4 then k(i,1) = 10*k(i-1,1) + 4 - k(i-3,n).
For n>1, k(1,n) = 0, k(2,n) = 2*n^2 - 2*n, k(3,n) = 2*n^2 + 2*n, k(4,n) = (8*n^2+2)*k(2,n) + 4*n^2 then k(i,n) = (8*n^2+2)*k(i-2,n) + 4*n^2 - k(i-4,n).
LINKS
Stefano Spezia, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(1) = 4, a(n) = 2*n^2 - 2*n for n > 1, j sequence = A106231.
a(n) = A046092(n-1), n > 1. - R. J. Mathar, Aug 28 2008
G.f.: 4*x*(x^3 - 3*x^2 + 2*x - 1)/(x - 1)^3. - Colin Barker, Mar 06 2013
E.g.f.: 4*x + 2*x^2*exp(x). - Stefano Spezia, Jun 06 2021
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {4, 4, 12, 24}, 50] (* Harvey P. Dale, Mar 05 2023 *)
PROG
(Magma) [4] cat [2*n*(n+1): n in [1..50]]; // Vincenzo Librandi, Apr 06 2020
(PARI) a(n) = if(n==1, 4, 2*n^2-2*n); \\ Jinyuan Wang, Apr 07 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Pierre CAMI, Apr 26 2005
EXTENSIONS
More terms from Colin Barker, Mar 06 2013
STATUS
approved