A247829 a(3*k) = k*(k+1), a(3*k+1) = (2*k-1)*(2*k+1), a(3*k+2) = (2*k-1)*(2*k+3).
0, -1, -3, 2, 3, 5, 6, 15, 21, 12, 35, 45, 20, 63, 77, 30, 99, 117, 42, 143, 165, 56, 195, 221, 72, 255, 285, 90, 323, 357, 110, 399, 437, 132, 483, 525, 156, 575, 621, 182, 675, 725, 210, 783, 837, 240, 899, 957, 272, 1023, 1085, 306, 1155, 1221, 342, 1295
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0,0,3,0,0,-3,0,0,1).
Crossrefs
Programs
-
Magma
m:=50; R
:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(x*(3*x^7-3*x^6-14*x^4-6*x^3-2*x^2+3*x+1)/((x-1)^3*(x^2 +x+1)^3))); // G. C. Greubel, Sep 20 2018 -
Maple
seq(op([k*(k+1),(2*k-1)*(2*k+1),(2*k-1)*(2*k+3)]), k=0..100); # Robert Israel, Dec 01 2014
-
Mathematica
Table[Sequence @@ {n*(n+1), (2*n-1)*(2*n+1), (2*n-1)*(2*n+3)}, {n, 0, 18}] (* Jean-François Alcover, Dec 16 2014 *)
-
PARI
concat(0, Vec(x*(3*x^7-3*x^6-14*x^4-6*x^3-2*x^2+3*x+1)/((x-1)^3*(x^2+x+1)^3) + O(x^100))) \\ Colin Barker, Dec 02 2014
Formula
a(n) = 3*a(n-3) - 3*a(n-6) + a(n-9).
a(3*k) + a(3*k+1) + a(3*k+2) = 9*k^2 + 5*k - 4.
G.f.: x*(3*x^7 - 3*x^6 - 14*x^4 - 6*x^3 - 2*x^2 + 3*x + 1)/((x-1)^3*(x^2 +x+1)^3). - Robert Israel, Dec 01 2014
a(n) = -(n^2 + n + floor(n/3)*(27*floor(n/3)^3 - 18*(n+1)*floor(n/3)^2 + (3*n^2 + 21*n - 14)*floor(n/3) - (5*n^2 - n + 5)))/2. - Luce ETIENNE, Mar 13 2017
From Amiram Eldar, Oct 08 2023: (Start)
Sum_{n>=1} 1/a(n) = 1/2.
Sum_{n>=1} (-1)^n/a(n) = Pi/4 + 1 - 2*log(2). (End)
Comments