%I M3897 #78 Oct 05 2022 05:02:10
%S 1,5,20,52,117,225,400,656,1025,1525,2196,3060,4165,5537,7232,9280,
%T 11745,14661,18100,22100,26741,32065,38160,45072,52897,61685,71540,
%U 82516,94725,108225,123136,139520,157505,177157,198612,221940,247285,274721,304400
%N Number of paraffins (see Losanitsch reference for precise definition).
%C 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
%C 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
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Vincenzo Librandi, <a href="/A006010/b006010.txt">Table of n, a(n) for n = 1..1000</a>
%H Nicolay Avilov, <a href="/A006010/a006010.png">Illustration of a(1)-a(6)</a>
%H Nicolay Avilov, <a href="https://elementy.ru/problems/2565/Lomanaya_v_kvadrate"> The problem of a broken line in a square</a> (in Russian).
%H S. M. Losanitsch, <a href="http://dx.doi.org/10.1002/cber.189703002144">Die Isomerie-Arten bei den Homologen der Paraffin-Reihe</a>, Chem. Ber. 30 (1897), 1917-1926.
%H S. M. Losanitsch, <a href="/A000602/a000602_1.pdf">Die Isomerie-Arten bei den Homologen der Paraffin-Reihe</a>, Chem. Ber. 30 (1897), 1917-1926. (Annotated scanned copy)
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (3,-1,-5,5,1,-3,1).
%F Sum of [ 1, 3, 9, ... ](A005994) + [ 0, 0, 1, 3, 9, ... ] + 2*[ 0, 1, 5, 15, 35, ... ](binomial(n, 4)).
%F 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
%F 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
%F 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
%t 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 *)
%t LinearRecurrence[{3,-1,-5,5,1,-3,1},{1,5,20,52,117,225,400},40] (* _Harvey P. Dale_, Dec 13 2018 *)
%o (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
%Y Cf. A005994, A186424 (2nd differences), A317614 (1st differences), A335648 (partial sums).
%K nonn,easy
%O 1,2
%A _N. J. A. Sloane_
%E More terms from _David W. Wilson_