%I #166 Aug 06 2024 15:31:36
%S 0,1,3,5,8,11,15,19,24,29,35,41,48,55,63,71,80,89,99,109,120,131,143,
%T 155,168,181,195,209,224,239,255,271,288,305,323,341,360,379,399,419,
%U 440,461,483,505,528,551,575,599,624,649,675,701,728,755,783,811,840
%N Expansion of x^2*(1+x-x^2)/((1-x^2)*(1-x)^2).
%C a(n+1) is the number of 2 X n binary matrices with no zero rows or columns, up to row and column permutation.
%C [ (4th elementary symmetric function of S(n))/(3rd elementary symmetric function of S(n)) ], where S(n) = {first n+3 odd positive integers}.
%C First differences are 1, 2, 2, 3, 3, 4, 4, 5, 5, ... .
%C Let M_n denotes the n X n matrix m(i,j) = 1 if i =j; m(i,j) = 1 if (i+j) is odd; m(i,j) = 0 if i+j is even, then a(n) = -det M_(n+1) - _Benoit Cloitre_, Jun 19 2002
%C a(n) is the number of squares with corners on an n X n grid, distinct up to translation. See also A002415, A108279.
%C Starting (1, 3, 5, 8, 11, ...), = row sums of triangle A135841. - _Gary W. Adamson_, Dec 01 2007
%C Number of solutions to x+y >= n-1 in integers x,y with 1 <= x <= y <= n-1. - _Franz Vrabec_, Feb 22 2008
%C Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=-1, A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=5, a(n-4)=-coeff(charpoly(A,x),x^2). - _Milan Janjic_, Jan 26 2010
%C Equals row sums of a triangle with alternate columns of (1,2,3,...) and (1,1,1,...). - _Gary W. Adamson_, May 21 2010
%C Conjecture: if a(n) = p#(primorial)-1 for some prime number p, then q=(n+1) is also a prime number where p#=floor(q^2/4). Tested up to n=10^100000 no counterexamples are found. It seems that the subsequence is very scattered. So far the triples (p,q,a(q-1)) are {(2,3,1), (3,5,5), (5,11,29), (7,29,209), (17,1429,510509)}. - _David Morales Marciel_, Oct 02 2015
%C Numbers of an Ulam spiral starting at 0 in which the shape of the spiral is exactly a rectangle. E.g., a(4)=5 the Ulam spiral is including at that moment only the elements 0,1,2,3,4,5 and the shape is a rectangle. The area is always a(n)+1. E.g., for a(4) the area of the rectangle is 2(rows) X 3(columns) = 6 = a(4) + 1. - _David Morales Marciel_, Apr 05 2016
%C Numbers of different quadratic forms (quadrics) in the real projective space P^n(R). - _Serkan Sonel_, Aug 26 2020
%C a(n+1) is the number of one-dimensional subspaces of (F_3)^n, counted up to coordinate permutation. E.g.: For n=4, there are five one-dimensional subspaces in (F_3)^3 up to coordinate permutation: [1 2 2] [0 2 2] [1 0 2] [0 0 2] [1 1 1]. This example suggests a bijection (which has to be adjusted for the all-ones matrix) with the binary matrices of the first comment. - _Álvar Ibeas_, Sep 21 2021
%D O. Giering, Vorlesungen über höhere Geometrie, Vieweg, Braunschweig, 1982. See p. 59.
%H Muniru A Asiru, <a href="/A024206/b024206.txt">Table of n, a(n) for n = 1..5000</a>
%H Tricia Muldoon Brown, <a href="https://arxiv.org/abs/1810.08235">On the unimodality of convolutions of sequences of binomial coefficients</a>, arXiv:1810.08235 [math.CO] (2018). See p. 15.
%H Ricardo Gómez Aíza, <a href="https://arxiv.org/abs/2402.16111">Trees with flowers: A catalog of integer partition and integer composition trees with their asymptotic analysis</a>, arXiv:2402.16111 [math.CO], 2024. See p. 23.
%H William F. Lunnon, <a href="http://dx.doi.org/10.1093/comjnl/12.4.377">A postage stamp problem</a>, Comput. J. 12 (1969), 377-380.
%H Thomas Wieder, <a href="http://www.math.nthu.edu.tw/~amen/2008/070301.pdf">The number of certain k-combinations of an n-set</a>, Applied Mathematics Electronic Notes, Vol. 8 (2008), pp. 45-52.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-2,1).
%F G.f.: x^2*(1+x-x^2)/((1-x^2)*(1-x)^2) = x^2*(1+x-x^2) / ( (1+x)*(1-x)^3 ).
%F a(n+1) = A002623(n) - A002623(n-1) - 1.
%F a(n) = A002620(n+1) - 1 = A014616(n-2) + 1.
%F a(n+1) = A002620(n) + n, n >= 0. - _Philippe Deléham_, Feb 27 2004
%F a(0)=0, a(n) = floor(a(n-1) + sqrt(a(n-1)) + 1) for n > 0. - _Gerald McGarvey_, Jul 30 2004
%F a(n) = floor((n+1)^2/4) - 1. - _Franz Vrabec_, Feb 22 2008
%F a(n) = A005744(n-1) - A005744(n-2). - _R. J. Mathar_, Nov 04 2008
%F a(n) = a(n-1) + [side length of the least square > a(n-1) ], that is a(n) = a(n-1) + ceiling(sqrt(a(n-1) + 1)). - _Ctibor O. Zizka_, Oct 06 2009
%F For a(1)=0, a(2)=1, a(n) = 2*a(n-1) - a(n-2) + 1 if n is odd; a(n) = 2*a(n-1) - a(n-2) if n is even. - _Vincenzo Librandi_, Dec 23 2010
%F a(n) = A181971(n, n-1) for n > 0. - _Reinhard Zumkeller_, Jul 09 2012
%F a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4); a(1)=0, a(2)=1, a(3)=3, a(4)=5. - _Harvey P. Dale_, Jun 14 2013
%F a(n) = floor( (n-1)*(n+3)/4 ). - _Wesley Ivan Hurt_, Jun 23 2013
%F a(n) = (2*n^2 + 4*n - 7 - (-1)^n)/8. - _Wesley Ivan Hurt_, Jul 22 2014
%F a(n) = a(-n-2) = n-1 + floor( (n-1)^2/4 ). - _Bruno Berselli_, Feb 03 2015
%F a(n) = (1/4)*(n+3)^2 - (1/8)*(1 + (-1)^n) - 1. - _Serkan Sonel_, Aug 26 2020
%F a(n) + a(n+1) = A034856(n). - _R. J. Mathar_, Mar 13 2021
%F a(2*n) = n^2 + n - 1, a(2*n+1) = n^2 + 2*n. - _Greg Dresden_ and _Zijie He_, Jun 28 2022
%F Sum_{n>=2} 1/a(n) = 7/4 + tan(sqrt(5)*Pi/2)*Pi/sqrt(5). - _Amiram Eldar_, Dec 10 2022
%F E.g.f.: (4 + (x^2 + 3*x - 4)*cosh(x) + (x^2 + 3*x - 3)*sinh(x))/4. - _Stefano Spezia_, Aug 06 2024
%e There are five 2 X 3 binary matrices with no zero rows or columns up to row and column permutation:
%e [1 0 0] [1 0 0] [1 1 0] [1 1 0] [1 1 1]
%e [0 1 1] [1 1 1] [0 1 1] [1 1 1] [1 1 1].
%p A024206:=n->(2*n^2+4*n-7-(-1)^n)/8: seq(A024206(n), n=1..100);
%t f[x_, y_] := Floor[ Abs[ y/x - x/y]]; Table[ Floor[ f[2, n^2 + 2 n - 2] /2], {n, 57}] (* _Robert G. Wilson v_, Aug 11 2010 *)
%t LinearRecurrence[{2,0,-2,1},{0,1,3,5},60] (* _Harvey P. Dale_, Jun 14 2013 *)
%t Rest[CoefficientList[Series[x^2 (1 + x - x^2)/((1 - x^2) (1 - x)^2), {x, 0, 70}], x]] (* _Vincenzo Librandi_, Oct 02 2015 *)
%o (PARI) a(n)=(n-1)*(n+3)\4 \\ _Charles R Greathouse IV_, Jun 26 2013
%o (PARI) x='x+O('x^99); concat(0, Vec(x^2*(1+x-x^2)/ ((1-x^2)*(1-x)^2))) \\ _Altug Alkan_, Apr 05 2016
%o (Haskell)
%o a024206 n = (n - 1) * (n + 3) `div` 4
%o a024206_list = scanl (+) 0 $ tail a008619_list
%o -- _Reinhard Zumkeller_, Dec 18 2013
%o (Magma) [(2*n^2+4*n-7-(-1)^n)/8 : n in [1..100]]; // _Wesley Ivan Hurt_, Jul 22 2014
%o (GAP) a:=[0,1,3,5];; for n in [5..65] do a[n]:=2*a[n-1]-2*a[n-3]+a[n-4]; od; a; # _Muniru A Asiru_, Oct 23 2018
%o (Python) def A024206(n): return (n+1)**2//4 - 1 # _Ya-Ping Lu_, Jan 01 2024
%Y Cf. A014616, A135841, A034856, A005744 (partial sums), A008619 (1st differences).
%Y A row or column of the array A196416 (possibly with 1 subtracted from it).
%Y Cf. A008619.
%Y Second column of A232206.
%K nonn,easy,nice
%O 1,3
%A _Clark Kimberling_
%E Corrected and extended by _Vladeta Jovovic_, Jun 02 2000