login
a(n) = numerator(3/(n+1)^3)*(3/2 + (-1)^n/2).
6

%I #64 Sep 12 2024 16:19:44

%S 6,3,2,3,6,1,6,3,2,3,6,1,6,3,2,3,6,1,6,3,2,3,6,1,6,3,2,3,6,1,6,3,2,3,

%T 6,1,6,3,2,3,6,1,6,3,2,3,6,1,6,3,2,3,6,1,6,3,2,3,6,1,6,3,2,3,6,1,6,3,

%U 2,3,6,1,6,3,2,3,6,1,6,3,2,3,6,1

%N a(n) = numerator(3/(n+1)^3)*(3/2 + (-1)^n/2).

%C (1/(2*Pi))*Integral_{t=0..2*Pi} exp(i*(n+1)*t)*((t-Pi)/i)^3 = (A129202(n)*Pi^2 - a(n))/A129196(n), i=sqrt(-1).

%C Periodic with period 6. - _Alois P. Heinz_, Oct 03 2012

%H Muniru A Asiru, <a href="/A129203/b129203.txt">Table of n, a(n) for n = 0..10000</a>

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

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

%F a(n) = cos(2*Pi*n/3) + sqrt(3)*sin(2*Pi*n/3) + cos(Pi*n/3)/3 - sqrt(3)*sin(Pi*n/3)/3 + 7*cos(Pi*n)/6 + 7/2.

%F a(n) = numerator(6/(n+1)^2). - _Paul Barry_, Apr 03 2007

%F a(n) = denominator of coefficient of x^6 in the Maclaurin expansion of -exp(-(n+1)*x^2). - _Francesco Daddi_, Aug 04 2011

%F a(n) = 3_(n+1)! = Gauss_factorial(3, n+1) = Product_{1<=j<=3, gcd(j,n+1)=1} j. - _Peter Luschny_, Oct 01 2012

%F a(n) = denominator((n+1)/6). - _Jon Hearn_, Nov 10 2013

%F a(n) = denominator of 2*(1/(12*n)+1)*n^n; related to gamma function approximation for positive integers less the factor sqrt(Pi/2)/(exp(n)*sqrt(n)). - _Thomas Blankenhorn_, Jun 21 2018

%F a(n) = 6/gcd(n+1,6). - _Ridouane Oudra_, Jul 29 2022

%p a:= n-> [6, 3, 2, 3, 6, 1][irem(n, 6)+1]:

%p seq(a(n), n=0..119); # _Alois P. Heinz_, Oct 03 2012

%t Array[Numerator[3/(# + 1)^3] (3/2 + (-1)^#/2) &, 105, 0] (* or *)

%t PadRight[{}, 105, {6, 3, 2, 3, 6, 1}] (* _Michael De Vlieger_, Jun 30 2018 *)

%t CoefficientList[ Series[-(x^5 + 6x^4 + 3x^3 + 2x^2 + 3x + 6)/(x^6 - 1), {x, 0,

%t 105}], x] (* or *)

%t LinearRecurrence[{0, 0, 0, 0, 0, 1}, {6, 3, 2, 3, 6, 1}, 105] (* _Robert G. Wilson v_, Jul 28 2018 *)

%o (Sage)

%o def Gauss_factorial(N, n): return mul(j for j in (1..N) if gcd(j, n) == 1)

%o def A129203(n): return Gauss_factorial(3, n+1)

%o [A129203(j) for j in (0..71)] # _Peter Luschny_, Oct 01 2012

%o (PARI) a(n)=[6, 3, 2, 3, 6, 1][n%6+1] \\ _Charles R Greathouse IV_, Oct 28 2014

%o (Magma) [Numerator(3/(n+1)^3)*(3/2 + (-1)^n/2): n in [1..100]]; // _Vincenzo Librandi_, Jul 01 2018

%o (Magma) &cat [[6, 3, 2, 3, 6, 1]^^20]; // _Vincenzo Librandi_, Jul 01 2018

%o (GAP) List(List([0..10],n->3/(n+1)^3*(3/2+(-1)^n/2)),NumeratorRat); # _Muniru A Asiru_, Jul 01 2018

%Y Cf. sequences listed in Comments section of A283393.

%K nonn,easy

%O 0,1

%A _Paul Barry_, Apr 03 2007