login
Row 2 of array in A114999.
5

%I #22 Aug 23 2023 07:20:25

%S 0,3,8,16,26,39,54,72,92,115,140,168,198,231,266,304,344,387,432,480,

%T 530,583,638,696,756,819,884,952,1022,1095,1170,1248,1328,1411,1496,

%U 1584,1674,1767,1862,1960,2060,2163,2268,2376,2486,2599,2714,2832,2952,3075,3200

%N Row 2 of array in A114999.

%C Number of lattice points (x,y) in the region of the coordinate plane bounded by y < 3x+1, y > x/2 and x <= n. - _Wesley Ivan Hurt_, Oct 27 2014

%H Vincenzo Librandi, <a href="/A115006/b115006.txt">Table of n, a(n) for n = 0..2000</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-2,1).

%F a(n) = floor((n+1)^2/4)+n*(n+1).

%F G.f.: x*(2*x+3)/((1-x)^3*(1+x)).

%F From _Wesley Ivan Hurt_, Oct 27 2014: (Start)

%F a(n) = 2*a(n-1)-2*a(n-3)+a(n-4).

%F a(n) = (10*n^2 + 12*n + 1 - (-1)^n)/8.

%F a(n) = Sum_{i=1..n+1} (10*i + (-1)^i - 9)/4. (End)

%F E.g.f.: (x*(11 + 5*x)*cosh(x) + (1 + 11*x + 5*x^2)*sinh(x))/4. - _Stefano Spezia_, Aug 22 2023

%p A115006:=n->(10*n^2 + 12*n + 1 - (-1)^n)/8: seq(A115006(n), n=0..50); # _Wesley Ivan Hurt_, Oct 27 2014

%t Table[(10*n^2 + 12*n + 1 - (-1)^n)/8, {n, 0, 50}] (* _Wesley Ivan Hurt_, Oct 27 2014 *)

%t LinearRecurrence[{2,0,-2,1},{0,3,8,16},60] (* _Harvey P. Dale_, Jan 13 2015 *)

%o (Magma) [ n*(n+1) + (n+1)^2 div 4: n in [0..50] ];

%o (PARI) {for(n=0, 50, print1(n*(n+1)+floor((n+1)^2/4), ","))}

%Y Cf. A114999, A000217 (triangular numbers), A002620 (quarter-squares), A001859 (triangular numbers plus quarter-squares), A017305 (10n+3), A147874 (zero followed by partial sums of A017305).

%Y Partial Sums of A047218.

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_, Feb 23 2006

%E Edited by _Klaus Brockhaus_, Nov 18 2008