OFFSET
0,3
COMMENTS
The answer to a question from Mike and Laurie Crain (2crains(AT)concentric.net): how many even numbers are there in an n X n multiplication table starting at 1 X 1?
a(n+1) is the number of pairs (x,y) with x and y in {0,...,n}, x and y of the same parity, and x+y >= n. - Clark Kimberling, Jul 02 2012
From J. M. Bergot, Aug 08 2013: (Start)
Define a triangle to have T(1,1)=0 and T(n,c) = n^2 - c^2. The difference of the sum of the terms in antidiagonal(n+1) and those in antidiagonal(n)=a(n).
Column 0 is vertical and T(n,n)=0. The first few rows are 0; 3,0; 8,5,0; 15,12,7,0; 24,21,16,9,0; 35,32,27,20,11,0; the first few antidiagonals are 0; 3; 8,0; 15,5; 24,12,0; 35,21,7; 48,32,16,0; the first few sum of terms in the antidiagonals are 0, 3, 8, 20, 36, 63, 96, 144, 200, 275, 360, 468, 588, 735, 896, 1088, 1296, 1539. (End)
Sum of the largest parts in the partitions of 2n into two distinct odd parts. For example, a(5) = 16; the partitions of 2(5) = 10 into two distinct odd parts are (9,1) and (7,3). The sum of the largest parts is then 9+7 = 16. - Wesley Ivan Hurt, Nov 27 2017
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
FORMULA
a(n) = n^2 - A008794(n+1).
G.f.: x^2*(x^2 + 2*x + 3)/(1-x^2)^2/(1-x). - Ralf Stephan, Jun 10 2003
a(n) = (1/8)*(2*n*(3*n-1)+(2*n+1)*(-1)^n-1). a(-n-1) = A014255(n). - Bruno Berselli, Sep 27 2011
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5), n > 4. - Harvey P. Dale, Nov 24 2011
E.g.f.: (x*(1 + 3*x)*cosh(x) + (3*x^2 + 3*x - 1)*sinh(x))/4. - Stefano Spezia, Aug 01 2022
MAPLE
MATHEMATICA
Table[n^2-Floor[((n+1)/2)]^2, {n, 0, 50}] (* or *) LinearRecurrence[ {1, 2, -2, -1, 1}, {0, 0, 3, 5, 12}, 51]
PROG
(Magma) [n^2-Floor( (n+1)/2 )^2 : n in [0..60]]; // Vincenzo Librandi, Sep 27 2011
(PARI) a(n)=n^2 - ((n+1)\2)^2 \\ Charles R Greathouse IV, Feb 19 2017
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
STATUS
approved