A217367 a(n) = ((n+7) / gcd(n+7,4)) * (n / gcd(n,4)).
0, 2, 9, 15, 11, 15, 39, 49, 30, 36, 85, 99, 57, 65, 147, 165, 92, 102, 225, 247, 135, 147, 319, 345, 186, 200, 429, 459, 245, 261, 555, 589, 312, 330, 697, 735, 387, 407, 855, 897, 470, 492, 1029, 1075, 561, 585, 1219, 1269, 660, 686, 1425, 1479, 767, 795, 1647
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Wikipedia, Quasi-polynomial.
- Index entries for linear recurrences with constant coefficients, signature (3,-6,10,-12,12,-10,6,-3,1).
Programs
-
Magma
m:=50; R
:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(2+3*x+6*x^4-6*x^5+4*x^6-3*x^7)/(1-x+x^2-x^3)^3)); // G. C. Greubel, Sep 20 2018 -
Mathematica
a[n_] := n*(n+7)/(2*Mod[1 + Floor[n/2], 2] + 2); Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Oct 01 2012 *) CoefficientList[Series[x (2 + 3 x + 6 x^4 - 6 x^5 + 4 x^6 - 3 x^7) / (1 - x + x^2 - x^3)^3, {x, 0, 33}], x] (* Vincenzo Librandi, Jul 17 2013 *)
-
PARI
my(x='x+O('x^50)); Vec(x*(2+3*x+6*x^4-6*x^5+4*x^6-3*x^7)/(1-x+x^2-x^3)^3) \\ G. C. Greubel, Sep 20 2018
Formula
a(n) = n*(n+7)/(2*mod(1 + floor(n/2), 2) + 2).
G.f.: x*(2 + 3*x + 6*x^4 - 6*x^5 + 4*x^6 - 3*x^7)/(1 - x + x^2 - x^3)^3.
From Peter Bala, Aug 07 2022: (Start)
a(n) = numerator of n*(n+7)/4.
a(n) is quasi-polynomial in n: if p(n) = n*(n+7)/4 then a(4*n) = p(4*n), a(4*n+1) = p(4*n+1), a(4*n+2) = 2*p(4*n+2) and a(4*n+3) = 2*p(4*n+3) = A303295(n+1) for n >= 1. (End)
Sum_{n>=1} 1/a(n) = 697/735 + Pi/14. - Amiram Eldar, Aug 16 2022
Comments