%I #24 Oct 23 2024 01:24:42
%S 2,3,1,1,9,1,1,3,1,1,3,1,1,27,1,1,3,1,1,3,1,1,9,1,1,3,1,1,3,1,1,9,1,1,
%T 3,1,1,3,1,1,81,1,1,3,1,1,3,1,1,9,1,1,3,1,1,3,1,1,9,1,1,3,1,1,3,1,1,
%U 27,1,1,3,1,1,3,1,1,9,1,1,3,1,1,3,1,1,9,1,1,3,1,1,3,1,1,27,1,1,3,1,1,3,1
%N Denominators of Glaisher's I-numbers.
%H Robert Israel, <a href="/A047789/b047789.txt">Table of n, a(n) for n = 0..10000</a>
%H J. W. L. Glaisher, <a href="https://doi.org/10.1112/plms/s1-31.1.216">On a set of coefficients analogous to the Eulerian numbers</a>, Proc. London Math. Soc., 31 (1899), 216-235.
%H <a href="/index/Ge#Glaisher">Index entries for sequences related to Glaisher's numbers</a>
%F From _Robert Israel_, Aug 14 2018: (Start)
%F For n >= 1, a(3*n) = a(3*n+2) = 1 and a(3*n+1) = 3*a(n).
%F G.f. g(x) satisfies g(x) = 3*x*g(x^3) + 2 - 3*x + (x^2+x^3)/(1-x^3). (End)
%e 1/2, 1/3, 1, 7, 809/9, 1847, 55601, 6921461/3,...
%p f:= n -> 3^padic:-ordp(2*n+1,3):
%p f(0):= 2:
%p map(f, [$0..200]); # _Robert Israel_, Aug 14 2018
%t a[0] = 2; a[n_] := 3^IntegerExponent[2n+1, 3];
%t Table[a[n], {n, 0, 101}] (* _Jean-François Alcover_, Feb 27 2019 *)
%t a[0]:=2; a[n_]:=Denominator[FunctionExpand[(PolyGamma[2*n, 1/3] + (3^(2*n+1)-1)*(2*n)!*Zeta[2*n+1]/2)*Sqrt[3]/(-2^(2*n)*Pi^(2*n+1))]]; Table[a[n], {n,0,100}] (* _Detlef Meya_, Sep 28 2024 *)
%o (PARI) a(n)=if(n<1,2*(n==0),3^valuation(2*n+1,3)) /* _Michael Somos_, Feb 26 2004 */
%o (PARI) a(n)=if(n<1,2*(n==0),n*=2;denominator(n!*polcoeff(3/(2+4*cos(x+O(x^n))),n))) /* _Michael Somos_, Feb 26 2004 */
%Y Cf. A047788, A002111.
%K nonn,frac,changed
%O 0,1
%A _N. J. A. Sloane_