login
a(n) is the denominator of x(n) = (2*x(n-1) + 1/n) mod 1, with x(0) = 0.
3

%I #25 Jul 14 2024 15:41:59

%S 1,1,2,3,12,30,30,105,840,1260,63,693,2772,18018,18018,45045,720720,

%T 6126120,3063060,29099070,58198140,29099070,29099070,334639305,

%U 2677114440,6692786100,1673196525,5019589575,20078358300,291136195350,291136195350,4512611027925,144403552893600

%N a(n) is the denominator of x(n) = (2*x(n-1) + 1/n) mod 1, with x(0) = 0.

%C See A374332 for details and links.

%H Paolo Xausa, <a href="/A374333/b374333.txt">Table of n, a(n) for n = 0..2000</a>

%t Block[{n = 0}, Denominator[NestList[Mod[2*# + 1/++n, 1] &, 0, 50]]]

%o (Python)

%o from itertools import count, islice

%o from fractions import Fraction

%o def A374333_gen(): # generator of terms

%o a = Fraction(0,1)

%o for n in count(1):

%o yield a.denominator

%o a = (2*a+Fraction(1,n)) % 1

%o A374333_list = list(islice(A374333_gen(),20)) # _Chai Wah Wu_, Jul 13 2024

%o (PARI) x(n) = if (n==0, 0, 2*x(n-1) + 1/n);

%o a(n) = denominator(frac(x(n))); \\ _Michel Marcus_, Jul 13 2024

%Y Cf. A374332 (numerators), A374335.

%K nonn,frac

%O 0,3

%A _Paolo Xausa_, Jul 06 2024