OFFSET
1,2
COMMENTS
This is also the square of the sum of the odd numbers plus the square of the sum of the even numbers, up to n. E.g., a(4) = (1+3)^2 + (2+4)^2 = 52. - Scott R. Shannon, Feb 20 2019
The area of a square whose side is a segment connecting the ends of a broken line (snake), the adjacent links of which are perpendicular and equal to the numbers 1, 2, 3, 4, ..., n. For example, a(5) = 9^2 + 6^2 = 117. - Nicolay Avilov, Aug 02 2022
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Nicolay Avilov, Illustration of a(1)-a(6)
Nicolay Avilov, The problem of a broken line in a square (in Russian).
S. M. Losanitsch, Die Isomerie-Arten bei den Homologen der Paraffin-Reihe, Chem. Ber. 30 (1897), 1917-1926.
S. M. Losanitsch, Die Isomerie-Arten bei den Homologen der Paraffin-Reihe, Chem. Ber. 30 (1897), 1917-1926. (Annotated scanned copy)
Index entries for linear recurrences with constant coefficients, signature (3,-1,-5,5,1,-3,1).
FORMULA
Sum of [ 1, 3, 9, ... ](A005994) + [ 0, 0, 1, 3, 9, ... ] + 2*[ 0, 1, 5, 15, 35, ... ](binomial(n, 4)).
If n is odd then a(n) = (1/8) * (n^4 + 2*n^3 + 2*n^2 + 2*n + 1) = Det(Transpose[M]*M) where M is the 2 X 3 matrix whose rows are [(n-1)/2, (n-1)/2], [(n-1)/2 + 1, 0] and [(n-1)/2 + 1, (n-1)/2 + 1]. If n is even then a(n) = (1/8) * (n^4 + 2*n^3 + 2*n^2) = Det(Transpose[M]*M) where M is the 2 X 3 matrix whose rows are [n/2, 0], [n/2, n/2] and [n/2 + 1, 0]. - Gerald McGarvey, Oct 30 2007
G.f.: -x*(x^4+2*x^3+6*x^2+2*x+1) / ((x-1)^5*(x+1)^2). - Colin Barker, Mar 20 2013
E.g.f.: (x*(7 + 15*x + 8*x^2 + x^3)*cosh(x) + (1 + 5*x + 15*x^2 + 8*x^3 + x^4)*sinh(x))/8. - Stefano Spezia, Jul 08 2020
MATHEMATICA
CoefficientList[Series[-(x^4 + 2 x^3 + 6 x^2 + 2 x + 1)/((x - 1)^5 (x + 1)^2), {x, 0, 40}], x] (* Vincenzo Librandi, Oct 14 2013 *)
LinearRecurrence[{3, -1, -5, 5, 1, -3, 1}, {1, 5, 20, 52, 117, 225, 400}, 40] (* Harvey P. Dale, Dec 13 2018 *)
PROG
(PARI) Vec(-x*(x^4+2*x^3+6*x^2+2*x+1)/((x-1)^5*(x+1)^2) + O(x^100)) \\ Colin Barker, Oct 05 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from David W. Wilson
STATUS
approved