cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A005996 G.f.: 2*(1-x^3)/((1-x)^5*(1+x)^2).

This page as a plain text file.
%I A005996 M1609 #72 Aug 22 2025 00:27:42
%S A005996 2,6,16,30,54,84,128,180,250,330,432,546,686,840,1024,1224,1458,1710,
%T A005996 2000,2310,2662,3036,3456,3900,4394,4914,5488,6090,6750,7440,8192,
%U A005996 8976,9826,10710,11664,12654,13718,14820,16000,17220,18522,19866,21296,22770,24334
%N A005996 G.f.: 2*(1-x^3)/((1-x)^5*(1+x)^2).
%C A005996 a(n) is also the number of triples (w,x,y) having all terms in {0,...,n} and w<R<=x, where R=max(w,x,y)-min(w,x,y). - _Clark Kimberling_, Jun 10 2012
%C A005996 a(n) is also the sum of all elements of the square matrix M(n-1) = M1(n-1) x M2(n-1), where M1(n) is the square matrix with elements m1(i,j)= (1+(-1)^(i+j+1))/2, A057212; and M2(n) is the square matrix given by m2(i,j)= (1+(-1)^(i+j))/2, A057212. - _Enrique Pérez Herrero_, Jun 15 2013
%C A005996 Also the number of longest paths in the (n+1)-web graph for n > 2. - _Eric W. Weisstein_, Mar 27 2018
%C A005996 a(n) also is the number of undirected rook moves on an n X n chessboard, taken up to 180 degree rotation and axial reflections (horizontal and vertical), for n >= 2. - _Hilko Koning_, Aug 16 2025
%D A005996 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A005996 Enrique Pérez Herrero, <a href="/A005996/b005996.txt">Table of n, a(n) for n = 1..1000</a>
%H A005996 S. M. Losanitsch, <a href="https://doi.org/10.1002/cber.189703002144">Die Isomerie-Arten bei den Homologen der Paraffin-Reihe</a>, Chem. Ber. 30 (1897), pp. 1917-1926.
%H A005996 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 A005996 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/LongestPathProblem.html">Longest Path Problem</a>
%H A005996 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/WebGraph.html">Web Graph</a>
%H A005996 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (2,1,-4,1,2,-1).
%F A005996 a(n) = 2*(A006918(n) + A006918(n-1) + A006918(n-2)), n>1. - _Ralf Stephan_, Apr 26 2003
%F A005996 a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6), with a(1)=2, a(2)=6, a(3)=16, a(4)=30, a(5)=54, a(6)=84. - _Harvey P. Dale_, Apr 08 2013
%F A005996 From _Ayoub Saber Rguez_, Nov 20 2021: (Start)
%F A005996 a(n) = A143785(n) - A002620(n+1).
%F A005996 a(n) = A128624(n) + A002620(n+1).
%F A005996 a(n) = (n^3 + 3*n^2 + 2*n + 1 + n*(n mod 2) - ((n+1) mod 2))/4. (End)
%t A005996 Table[(1/4)*(1 + n)*(-2 + 5*n + n^2 + 2*Ceiling[1/2 - n/2] - 4*Floor[n/2]), {n, 1, 200}] (* _Enrique Pérez Herrero_, Aug 03 2012 *)
%t A005996 CoefficientList[Series[2 (1 - x^3)/((1 - x)^5 (1 + x)^2), {x, 0, 40}], x] (* _Harvey P. Dale_, Apr 08 2013 *)
%t A005996 LinearRecurrence[{2, 1, -4, 1, 2, -1}, {2, 6, 16, 30, 54, 84}, 40] (* _Harvey P. Dale_, Apr 08 2013 *)
%t A005996 Table[(n + 1) (2 n (n + 2) + 1 - (-1)^n)/8, {n, 20}] (* _Eric W. Weisstein_, Mar 27 2018 *)
%Y A005996 Essentially twice A034828.
%K A005996 nonn,easy,changed
%O A005996 1,1
%A A005996 _N. J. A. Sloane_
%E A005996 Edited by _N. J. A. Sloane_, Aug 03 2012