A377506 a(n) is the nearest integer to 1/gamma(x_n), where x_n is the n-th extrema of gamma(x).
1, 0, 0, -1, 4, -19, 107, -716, 5498, -47789, 463517, -4962289, 58115593, -739030560, 10140362326, -149320366368, 2348685116841, -39299792354491, 697018000148170, -13061370974841665, 257854085426453001, -5349016057902489052, 116324040001711961903, -2646269955793816322943, 62852365790563502907461
Offset: 1
Keywords
Examples
a(0) = round(1/Γ(x_0)) = round(1/Γ(1.4616321449683622)) = round(1/0.8856031944108887) = 1 a(1) = round(1/Γ(x_1)) = round(1/Γ(-0.5040830082644554)) = round(1/-3.544643611155005) = 0 where x_m is the m-th extrema of gamma(x) or equivalently the m-th root of digamma(x).
Links
- Wikipedia, Gamma Extrema
- Wikipedia, Digamma Roots
Crossrefs
Cf. A374856.
Programs
-
Mathematica
a[n_] := Module[{root}, root = FindRoot[PolyGamma[0, x] == 0, {x, -n + 10^-10, -n + 0.5}, WorkingPrecision -> 100]; Round[1/Gamma[x /. root]] ] Table[a[n], {n, 0, 24}]
-
Python
from mpmath import findroot, digamma, mp, iv mp.dps = iv.dps = 30 def generate_sequence(n): seq, gamma_extrema = [], 1.4616321449683622 for i in range(n): gamma_extrema = findroot(lambda x: digamma(x+1), x0=gamma_extrema-1) reci_gamma = iv.rgamma(gamma_extrema+1) gamma_extrema = -mp.fabs(gamma_extrema) assert -i-1 < -mp.fabs(gamma_extrema) < -i-0.4 nint_reci = mp.nint(reci_gamma.a) assert nint_reci == mp.nint(reci_gamma.b) seq.append(int(nint_reci)) return seq A377506 = generate_sequence(n=25)
Comments