%I #51 Sep 08 2022 08:44:39
%S 1,3,8,12,21,27,40,48,65,75,96,108,133,147,176,192,225,243,280,300,
%T 341,363,408,432,481,507,560,588,645,675,736,768,833,867,936,972,1045,
%U 1083,1160,1200,1281,1323,1408,1452,1541,1587,1680,1728,1825,1875,1976,2028
%N Expansion of (1+2*x+3*x^2)/((1-x)*(1-x^2)^2).
%C A002620(n+1) is the n-th partial arithmetic mean. - _Michael Somos_, Feb 14 2004
%C The smallest integer greater than a(n-1) such that the n-th partial arithmetic mean is an integer is a(n) if n is odd or a(n)-(n+1) if n is even. - _Michael Somos_, Feb 14 2004
%C Beginning with 1, the smallest integer greater than the previous term such that no three consecutive terms are in arithmetic progression and the n-th partial arithmetic mean is an integer. - _Amarnath Murthy_, Feb 05 2004
%C The maximum possible number of black cells in a solution to an (n+1) X (n+1) nurikabe grid. - _Tanya Khovanova_, Feb 24 2009
%C Let M = an infinite lower triangular matrix with alternate columns composed of (1,1,1,...) and (1,2,2,2,...); and Q = the diagonalized variant of (1,2,3,...). Then Q*M = a triangle with row sums = A014255. - _Gary W. Adamson_, May 14 2010
%C Number of pairs (x,y) with x and y in {0,...,n} having the same parity and x+y < n. - _Clark Kimberling_, Jul 02 2012
%C Form an array with m(0,0)=0 and m(i,j)=|i^2 - j^2|. One-half the difference between the sum of the terms in antidiagonal(n) and those in antidiagonal(n-1)=a(n). - _J. M. Bergot_, Jul 10 2013
%C For n > 0, a(n-1) is the sum of the largest parts in the partitions of 2n into two odd parts. - _Wesley Ivan Hurt_, Dec 19 2017
%C Sum of the odd numbers in the interval [m, 2*m] with m > 0. Example: for m = 5, the sum of the odd numbers in [5, 10] is 5 + 7 + 9 = 21, therefore 21 is a term of this sequence. - _Bruno Berselli_, Oct 25 2018
%H G. C. Greubel, <a href="/A014255/b014255.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1).
%F G.f.: (1+2*x+3*x^2)/((1-x)*(1-x^2)^2).
%F a(n) = (n+1)^2 - floor((n+1)/2)^2. - _Franklin T. Adams-Watters_, May 26 2006
%F a(n) = (6*n^2 + 14*n + 7 + (-1)^n*(2*n + 1))/8. - _R. J. Mathar_, Mar 22 2011
%F a(n) = (k+1)*(3*k+1) if n = 2*k, 3*(k+1)^2 if n = 2*k+1. - _Michael Somos_, Feb 27 2014
%F E.g.f.: ((4+9*x+3*x^2)*cosh(x) + (3+11*x+3*x^2)*sinh(x))/4. - _G. C. Greubel_, Jun 18 2019
%e From _Gary W. Adamson_, May 14 2010: (Start)
%e The first few rows of the generating triangle are
%e 1;
%e 1, 2;
%e 1, 4, 3;
%e 1, 4, 3, 4;
%e 1, 4, 3, 8, 5;
%e 1, 4, 3, 8, 5, 6;
%e 1, 4, 3, 8, 5, 12, 7;
%e 1, 4, 3, 8, 5, 12, 7, 8;
%e 1, 4, 3, 8, 5, 12, 7, 16, 9;
%e 1, 4, 3, 8, 5, 12, 7, 16, 9, 10;
%e ...
%e Row sums are 1, 3, 8, 12, 21, 27, 40, ... (End)
%e G.f. = 1 + 3*x + 8*x^2 + 12*x^3 + 21*x^4 + 27*x^5 + 40*x^6 + 48*x^7 + ...
%t Array[(# + 1)^2 - Floor[(# + 1)/2]^2 &, 52, 0] (* or *)
%t CoefficientList[Series[(1+2x+3x^2)/((1-x)(1-x^2)^2), {x, 0, 51}], x] (* _Michael De Vlieger_, Dec 20 2017 *)
%o (PARI) vector(55, n, n--; (6*n^2+14*n+7 +(-1)^n*(2*n+1))/8) \\ _G. C. Greubel_, Jun 18 2019
%o (Magma) [(6*n^2+14*n+7 +(-1)^n*(2*n+1))/8: n in [0..55]]; // _G. C. Greubel_, Jun 18 2019
%o (Sage) [(6*n^2+14*n+7 +(-1)^n*(2*n+1))/8 for n in (0..55)] # _G. C. Greubel_, Jun 18 2019
%o (GAP) List([0..55], n-> (6*n^2+14*n+7 +(-1)^n*(2*n+1))/8) # _G. C. Greubel_, Jun 18 2019
%K nonn,easy
%O 0,2
%A _N. J. A. Sloane_