login
a(n) = (10*n^2+8*n-1+(-1)^n)/8.
4

%I #34 Sep 08 2022 08:46:10

%S 0,2,7,14,24,36,51,68,88,110,135,162,192,224,259,296,336,378,423,470,

%T 520,572,627,684,744,806,871,938,1008,1080,1155,1232,1312,1394,1479,

%U 1566,1656,1748,1843,1940,2040,2142,2247,2354,2464,2576,2691,2808,2928,3050

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

%C a(n) is the number of lattice points (x,y) in the coordinate plane bounded by y < 3x, y >= x/2 and x <= n.

%C a(n)+1 is the number of lattice points bounded by y <= 3x, y >= x/2 and x <= n.

%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+3*x)/((1-x)^3*(1+x)).

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

%F a(n) = A004526(n) + A226292(n), for n>0.

%F a(n) = Sum_{i=0..n} A001068(2*i). - _Wesley Ivan Hurt_, May 06 2016

%F E.g.f.: (x*(9 + 5*x)*exp(x) - sinh(x))/4. - _Ilya Gutkovskiy_, May 06 2016

%F a(2n) = A168668(n). a(2n-1) = A135706(n). - _Wesley Ivan Hurt_, May 09 2016

%p A249547:=n->(10*n^2+8*n-1+(-1)^n)/8: seq(A249547(n), n=0..100);

%t Table[(10*n^2 + 8 n - 1 + (-1)^n)/8 , {n, 0, 50}]

%o (Magma) [(10*n^2+8*n-1+(-1)^n)/8 : n in [0..50]];

%o (PARI) a(n) = (10*n^2+8*n-1+(-1)^n)/8; \\ _Michel Marcus_, Nov 04 2014

%o (PARI) concat(0, Vec(x*(2+3*x)/((1-x)^3*(1+x)) + O(x^100))) \\ _Altug Alkan_, Oct 28 2015

%Y Cf. A001068, A004526, A135706, A168668, A226292.

%K nonn,easy

%O 0,2

%A _Wesley Ivan Hurt_, Oct 31 2014