login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


a(n) = floor[geometric mean of first n factorials].
2

%I #46 Sep 08 2022 08:45:12

%S 1,1,2,4,8,17,38,91,230,605,1661,4735,13998,42795,135021,438826,

%T 1466690,5033778,17716515,63865399,235547709,887938469,3418054843,

%U 13424588130,53753996494,219278318407,910679550679,3848136018924,16534775039068,72206065899240

%N a(n) = floor[geometric mean of first n factorials].

%H Peter Luschny and Jon E. Schoenfield, <a href="/A090901/b090901.txt">Table of n, a(n) for n = 1..871</a> (First 100 terms from _Peter Luschny_)

%F a(n) = floor(A000178(n)^(1/n)).

%p a := n -> mul(k!^(1/n), k=1..n):

%p prec := n -> max(10,ceil(log(2*Pi*n)/2+n*(log(n/exp(1))))):

%p seq(floor(evalf(a(n), prec(n))), n=1..100); # _Peter Luschny_, Nov 27 2015

%t Module[{nn=30,fs},fs=Range[nn]!;Table[Floor[GeometricMean[Take[fs,n]]],{n,nn}]] (* _Harvey P. Dale_, Nov 27 2015 *)

%o (PARI) a(n) = default(realprecision, 2*n); floor(prod(i=2, n, i!)^(1/n));

%o vector(500, n, a(n)) \\ _Altug Alkan_, Nov 27 2015

%o (Magma) a:=[]; f:=1; P:=1; for n in [1..100] do f*:=n; P*:=f; g:=Floor(P^(1/n)); while true do d:=g^n-P; if d gt 0 then g-:=Ceiling((1.0*d)*g/P/n); else d:=P-(g+1)^n; if d ge 0 then g+:=Ceiling((1.0*d)*g/P/n); else break; end if; end if; end while; a[n]:=g; end for; a; // _Jon E. Schoenfield_, Nov 27 2015

%o (Sage)

%o def a(n): # Throws an error if result could not be computed exactly.

%o prec = max(53, ceil(0.75*ceil((log(2*pi*n)/2+n*(log(n/exp(1)))))))

%o rif = RealIntervalField(prec)

%o r = rif(prod(factorial(k)^(1/n) for k in (1..n)))

%o return r.unique_floor()

%o [a(n) for n in (1..100)] # _Peter Luschny_, Nov 28 2015

%Y Cf. A090902.

%K nonn

%O 1,3

%A _Amarnath Murthy_, Dec 12 2003

%E Corrected and extended by _N. J. A. Sloane_, Oct 26 2004

%E More terms from _Emeric Deutsch_, Apr 13 2005

%E Corrected by _Harvey P. Dale_, Nov 27 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 22 12:51 EDT 2024. Contains 376114 sequences. (Running on oeis4.)