%I #21 Jun 07 2023 12:10:47
%S 1,3,34,294,4996,72612,1661680,34029840,981118240,25947526560,
%T 902963019520,29279156256000,1193967167680000,45861003136704000,
%U 2144641818280192000,95220827527499520000,5023176259163442688000,253121597596239128064000,14869466904778827894784000
%N a(n) = ( Product {k = 1..n} 3*k - 1 ) * ( Sum {k = 1..n} (-1)^(k+1)/(3*k - 1) ).
%C Original name: s(1)*s(2)*...*s(n)*(1/s(1) - 1/s(2) + ... + c/s(n)), where c = (-1)^(n+1) and s(k) = 3k-1 for k = 1,2,3,...
%H Harvey P. Dale, <a href="/A024396/b024396.txt">Table of n, a(n) for n = 1..381</a>
%H L. Euler, <a href="http://eulerarchive.maa.org/">De fractionibus continuis observationes</a>, The Euler Archive, Index Number 123, Section 5
%F From _Peter Bala_, Feb 20 2015: (Start)
%F Recurrence: a(n+1) = 3*a(n) + (3*n - 1)^2*a(n-1) with a(1) = 1 and a(2) = 3.
%F The triple factorial numbers A008544 satisfy the same second-order recurrence equation. This leads to the continued fraction representation a(n)/A008544(n) = 1/(2 + 2^2/(3 + 5^2/(3 + 8^2/(3 + ... + (3*n - 1)^2/(3 )))).
%F Taking the limit as n -> infinity gives the generalized continued fraction: Sum {k >= 1} (-1)^(k+1)/(3*k - 1) = 1/(2 + 2^2/(3 + 5^2/(3 + 8^2/(3 + 11^2/(3 + ... ))))) due to Euler. The alternating sum has the value 1/3*( Pi/sqrt(3) - log(2) ) = A193534. Cf. A024217. (End)
%F a(n) ~ GAMMA(1/3) * 3^(n-1) * n^(n+1/6) * (Pi - sqrt(3)*log(2)) / (sqrt(2*Pi) * exp(n)). - _Vaclav Kotesovec_, Feb 21 2015
%p a[1] := 1: a[2] := 3: for n from 3 to 20 do a[n] := 3*a[n-1]+(3*n-4)^2*a[n-2] end do: seq(a[n], n = 1 .. 20); # _Peter Bala_, Feb 20 2015
%t Table[Product[3*k-1,{k,1,n}] * Sum[(-1)^(k+1)/(3*k-1),{k,1,n}],{n,1,20}] (* _Vaclav Kotesovec_, Feb 21 2015 *)
%t nxt[{n_,a_,b_}]:={n+1,b,3b+a*(3n-1)^2}; NestList[nxt,{2,1,3},20][[;;,2]] (* _Harvey P. Dale_, Jun 07 2023 *)
%o (Magma) I:=[1,3]; [n le 2 select I[n] else 3*Self(n-1)+(3*n-4)^2*Self(n-2): n in [1..20]]; // _Vincenzo Librandi_, Feb 21 2015
%Y Cf. A008544, A024217, A193534.
%K nonn,easy
%O 1,2
%A _Clark Kimberling_
%E New name from _Peter Bala_, Feb 20 2015
%E a(18)-a(19) from _Vincenzo Librandi_, Feb 21 2015