OFFSET
1,2
COMMENTS
For n > 1, a(n) is the sum of the numbers appearing along the outside border of an n X n square array whose elements are the numbers from 1..n^2, listed in increasing order by rows. - Wesley Ivan Hurt, May 13 2021
REFERENCES
T. A. Gulliver, Sequences from Arrays of Integers, Int. Math. Journal, Vol. 1, No. 4, pp. 323-332, 2002.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..2000
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = 2*A062158(n).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
G.f.: 2*x*(5+x^2)/(1 - x)^4 - Harvey P. Dale, Jun 27 2021
E.g.f.: 2*exp(x)*x*(5 + 5*x + x^2). - Stefano Spezia, Apr 22 2023
a(n) = (n-1)*A005893(n). - G. C. Greubel, Aug 05 2024
EXAMPLE
From Wesley Ivan Hurt, May 13 2021: (Start)
Given the 4 X 4 square array below,
[ 1 2 3 4 ]
[ 5 6 7 8 ]
[ 9 10 11 12 ]
[ 13 14 15 16 ]
the sum of the elements along the outside border is 1+2+3+4+8+12+16+15+14+13+9+5 = 102. Thus a(4) = 102. (End)
MATHEMATICA
Table[2(n-1)(n^2+1), {n, 50}] (* or *) LinearRecurrence[{4, -6, 4, -1}, {0, 10, 40, 102}, 50] (* Harvey P. Dale, Jun 27 2021 *)
PROG
(Magma) [2*(n-1)*(n^2+1): n in [1..50]]; // Vincenzo Librandi, Jun 14 2011
(SageMath)
def A071233(n): return 2*(n-1)*(n^2+1)
[A071233(n) for n in range(1, 51)] # G. C. Greubel, Aug 05 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jun 11 2002
STATUS
approved