OFFSET
1,3
COMMENTS
a(n) approximately equals exp(Pi/tan(Pi/n)).
LINKS
FORMULA
A377376(a(n)) = n.
EXAMPLE
-1 + 1.46163214496836 < 1/1
1 - 0.50408300826446 < 1/2
6 - 5.66716244155689 < 1/3
23 - 22.7502429843061 < 1/4
76 - 75.8003723367285 < 1/5
231 - 230.833395691244 < 1/6
PROG
(Python)
from mpmath import findroot, digamma, mp
def generate_sequence(n):
i, j, seq, gamma_extrema = 0, mp.mpf(1), [], 1.4616321449683622
while True:
gamma_extrema = findroot(lambda x: digamma(x+1), x0=gamma_extrema-1)
gamma_extrema = -mp.fabs(gamma_extrema)
assert -i-1 < gamma_extrema < -i-0.4
if mp.frac(gamma_extrema) < 1/j:
seq.append(i)
if j == n:
break
j += 1
i += 1
return seq
A374856 = generate_sequence(10)
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Jwalin Bhatt, Sep 16 2024
STATUS
approved