OFFSET
0,3
COMMENTS
See A374332 for details and links.
LINKS
Paolo Xausa, Table of n, a(n) for n = 0..2000
MATHEMATICA
Block[{n = 0}, Denominator[NestList[Mod[2*# + 1/++n, 1] &, 0, 50]]]
PROG
(Python)
from itertools import count, islice
from fractions import Fraction
def A374333_gen(): # generator of terms
a = Fraction(0, 1)
for n in count(1):
yield a.denominator
a = (2*a+Fraction(1, n)) % 1
(PARI) x(n) = if (n==0, 0, 2*x(n-1) + 1/n);
a(n) = denominator(frac(x(n))); \\ Michel Marcus, Jul 13 2024
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Paolo Xausa, Jul 06 2024
STATUS
approved