cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A319493 a(n) = 1*2 - 3 + 4*5 - 6 + 7*8 - 9 + 10*11 - 12 + 13*14 - ... + (up to n).

This page as a plain text file.
%I A319493 #16 Aug 13 2025 23:07:29
%S A319493 1,2,-1,3,19,13,20,69,60,70,170,158,171,340,325,341,597,579,598,959,
%T A319493 938,960,1444,1420,1445,2070,2043,2071,2855,2825,2856,3817,3784,3818,
%U A319493 4974,4938,4975,6344,6305,6345,7945,7903,7946,9795,9750,9796,11912,11864,11913
%N A319493 a(n) = 1*2 - 3 + 4*5 - 6 + 7*8 - 9 + 10*11 - 12 + 13*14 - ... + (up to n).
%H A319493 Colin Barker, <a href="/A319493/b319493.txt">Table of n, a(n) for n = 1..1000</a>
%H A319493 <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,3,-3,0,-3,3,0,1,-1).
%F A319493 a(n) = floor((n + 1)/3)*(3*floor((n + 1)/3)^2 - 1) + n*(floor((n - 1)/3) - floor((n - 2)/3)) - 3*floor(n/3)*(floor(n/3) + 1)/2.
%F A319493 From _Colin Barker_, Sep 20 2018: (Start)
%F A319493 G.f.: x*(1 + x)*(1 - 3*x^2 + 4*x^3 + 9*x^4 - 6*x^5 + 4*x^6) / ((1 - x)^4*(1 + x + x^2)^3).
%F A319493 a(n) = a(n-1) + 3*a(n-3) - 3*a(n-4) - 3*a(n-6) + 3*a(n-7) + a(n-9) - a(n-10) for n>10. (End)
%e A319493 a(1) = 1;
%e A319493 a(2) = 1*2 = 2;
%e A319493 a(3) = 1*2 - 3 = -1;
%e A319493 a(4) = 1*2 - 3 + 4 = 3;
%e A319493 a(5) = 1*2 - 3 + 4*5 = 19;
%e A319493 a(6) = 1*2 - 3 + 4*5 - 6 = 13;
%e A319493 a(7) = 1*2 - 3 + 4*5 - 6 + 7 = 20;
%e A319493 a(8) = 1*2 - 3 + 4*5 - 6 + 7*8 = 69;
%e A319493 a(9) = 1*2 - 3 + 4*5 - 6 + 7*8 - 9 = 60;
%e A319493 a(10) = 1*2 - 3 + 4*5 - 6 + 7*8 - 9 + 10 = 70;
%e A319493 a(11) = 1*2 - 3 + 4*5 - 6 + 7*8 - 9 + 10*11 = 170;
%e A319493 a(12) = 1*2 - 3 + 4*5 - 6 + 7*8 - 9 + 10*11 - 12 = 158;
%e A319493 a(13) = 1*2 - 3 + 4*5 - 6 + 7*8 - 9 + 10*11 - 12 + 13 = 171;
%e A319493 a(14) = 1*2 - 3 + 4*5 - 6 + 7*8 - 9 + 10*11 - 12 + 13*14 = 340; etc.
%t A319493 Table[Floor[(n + 1)/3]*(3*Floor[(n + 1)/3]^2 - 1) + n*(Floor[(n - 1)/3] - Floor[(n - 2)/3]) - 3*Floor[n/3]*(Floor[n/3] + 1)/2, {n, 50}]
%t A319493 CoefficientList[Series[(1 + x)*(1 - 3*x^2 + 4*x^3 + 9*x^4 - 6*x^5 + 4*x^6)/((1 - x)^4*(1 + x + x^2)^3), {x, 0, 50}], x] (* _Stefano Spezia_, Sep 23 2018 *)
%o A319493 (PARI) Vec(x*(1 + x)*(1 - 3*x^2 + 4*x^3 + 9*x^4 - 6*x^5 + 4*x^6) / ((1 - x)^4*(1 + x + x^2)^3) + O(x^50)) \\ _Colin Barker_, Sep 20 2018
%Y A319493 Cf. A305189, A319258.
%K A319493 sign,easy
%O A319493 1,2
%A A319493 _Wesley Ivan Hurt_, Sep 20 2018