OFFSET
1,3
COMMENTS
a(n+1) is the number of 2 X n binary matrices with no zero rows or columns, up to row and column permutation.
[ (4th elementary symmetric function of S(n))/(3rd elementary symmetric function of S(n)) ], where S(n) = {first n+3 odd positive integers}.
First differences are 1, 2, 2, 3, 3, 4, 4, 5, 5, ... .
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
a(n) is the number of squares with corners on an n X n grid, distinct up to translation. See also A002415, A108279.
Starting (1, 3, 5, 8, 11, ...), = row sums of triangle A135841. - Gary W. Adamson, Dec 01 2007
Number of solutions to x+y >= n-1 in integers x,y with 1 <= x <= y <= n-1. - Franz Vrabec, Feb 22 2008
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
Equals row sums of a triangle with alternate columns of (1,2,3,...) and (1,1,1,...). - Gary W. Adamson, May 21 2010
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
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
Numbers of different quadratic forms (quadrics) in the real projective space P^n(R). - Serkan Sonel, Aug 26 2020
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
REFERENCES
O. Giering, Vorlesungen über höhere Geometrie, Vieweg, Braunschweig, 1982. See p. 59.
LINKS
Muniru A Asiru, Table of n, a(n) for n = 1..5000
Tricia Muldoon Brown, On the unimodality of convolutions of sequences of binomial coefficients, arXiv:1810.08235 [math.CO] (2018). See p. 15.
Ricardo Gómez Aíza, Trees with flowers: A catalog of integer partition and integer composition trees with their asymptotic analysis, arXiv:2402.16111 [math.CO], 2024. See p. 23.
William F. Lunnon, A postage stamp problem, Comput. J. 12 (1969), 377-380.
Thomas Wieder, The number of certain k-combinations of an n-set, Applied Mathematics Electronic Notes, Vol. 8 (2008), pp. 45-52.
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
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 ).
a(n+1) = A002620(n) + n, n >= 0. - Philippe Deléham, Feb 27 2004
a(0)=0, a(n) = floor(a(n-1) + sqrt(a(n-1)) + 1) for n > 0. - Gerald McGarvey, Jul 30 2004
a(n) = floor((n+1)^2/4) - 1. - Franz Vrabec, Feb 22 2008
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
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
a(n) = A181971(n, n-1) for n > 0. - Reinhard Zumkeller, Jul 09 2012
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
a(n) = floor( (n-1)*(n+3)/4 ). - Wesley Ivan Hurt, Jun 23 2013
a(n) = (2*n^2 + 4*n - 7 - (-1)^n)/8. - Wesley Ivan Hurt, Jul 22 2014
a(n) = a(-n-2) = n-1 + floor( (n-1)^2/4 ). - Bruno Berselli, Feb 03 2015
a(n) = (1/4)*(n+3)^2 - (1/8)*(1 + (-1)^n) - 1. - Serkan Sonel, Aug 26 2020
a(n) + a(n+1) = A034856(n). - R. J. Mathar, Mar 13 2021
a(2*n) = n^2 + n - 1, a(2*n+1) = n^2 + 2*n. - Greg Dresden and Zijie He, Jun 28 2022
Sum_{n>=2} 1/a(n) = 7/4 + tan(sqrt(5)*Pi/2)*Pi/sqrt(5). - Amiram Eldar, Dec 10 2022
E.g.f.: (4 + (x^2 + 3*x - 4)*cosh(x) + (x^2 + 3*x - 3)*sinh(x))/4. - Stefano Spezia, Aug 06 2024
EXAMPLE
There are five 2 X 3 binary matrices with no zero rows or columns up to row and column permutation:
[1 0 0] [1 0 0] [1 1 0] [1 1 0] [1 1 1]
[0 1 1] [1 1 1] [0 1 1] [1 1 1] [1 1 1].
MATHEMATICA
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 *)
LinearRecurrence[{2, 0, -2, 1}, {0, 1, 3, 5}, 60] (* Harvey P. Dale, Jun 14 2013 *)
Rest[CoefficientList[Series[x^2 (1 + x - x^2)/((1 - x^2) (1 - x)^2), {x, 0, 70}], x]] (* Vincenzo Librandi, Oct 02 2015 *)
PROG
(PARI) a(n)=(n-1)*(n+3)\4 \\ Charles R Greathouse IV, Jun 26 2013
(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
(Haskell)
a024206 n = (n - 1) * (n + 3) `div` 4
a024206_list = scanl (+) 0 $ tail a008619_list
-- Reinhard Zumkeller, Dec 18 2013
(Magma) [(2*n^2+4*n-7-(-1)^n)/8 : n in [1..100]]; // Wesley Ivan Hurt, Jul 22 2014
(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
(Python) def A024206(n): return (n+1)**2//4 - 1 # Ya-Ping Lu, Jan 01 2024
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
Corrected and extended by Vladeta Jovovic, Jun 02 2000
STATUS
approved