%I #26 May 08 2014 11:53:29
%S 1,3,-3,-15,45,315,-1575,-14175,99225,1091475,-9823275,-127702575,
%T 1404728325,21070924875,-273922023375,-4656674397375,69850115960625,
%U 1327152203251875,-22561587455281875,-473793336560919375
%N Denominators q[ n ] of convergents to Stern's non-simple continued fraction for Pi/2.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Pi.html">Pi.</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PiContinuedFraction.html">Pi Continued Fraction.</a>
%H <a href="/index/St#Stern">Index entries for sequences related to Stern's sequences</a>
%F E.g.f.: exp(asinh(x))((1+x)/(1+x^2)+(2-x+x^2)/(1+x^2)^(3/2))-2. - _Michael Somos_, Mar 11 2004
%F E.g.f.: (1+3*x+2*x^3)/(1+x^2)^(3/2). - _Vaclav Kotesovec_, Oct 05 2013
%F a(n) ~ 2*(cos(Pi*n/2)+sin(Pi*n/2)) * n^(n+1) / exp(n). - _Vaclav Kotesovec_, Oct 05 2013
%t b[ n_ ] := 2-(-1)^n; a[ 1 ] := -1; a[ n_Integer?EvenQ ] := -n(n+1); a[ n_Integer?OddQ ] := -(n-2)(n-1); then use the standard algorithm to get p[ n ]/q[ n ].
%t a[n_] := Product[If[OddQ[k], k+2, 1-k], {k, 1, n}]; Table[a[n], {n, 0, 19}] (* _Jean-François Alcover_, Nov 06 2012, after 1st Pari program *)
%o (PARI) a(n)=if(n<0,0,prod(k=1,n,if(k%2,k+2,1-k)))
%o (PARI) {a(n)=local(A); if(n<0, 0, A=matrix(2,n+1); for(k=0, n, A[2, k+1]=if(k%2, 3, 1); A[1, k+1]=if(k<2, (-1)^k, if(k%2, -(k-2)*(k-1), -k*(k+1)))); contfracpnqn(A)[2,1])} /* _Michael Somos_, Jul 15 2003 */
%Y Numerators p[ n ] are (-1)^[n/2]*A001900(n). See also A013069.
%Y Cf. A079484.
%K sign,frac
%O 0,2
%A _Eric W. Weisstein_