cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A375520 a(n) = A375516(n)/LCM{1,...,n}.

This page as a plain text file.
%I A375520 #22 Feb 14 2025 14:52:42
%S A375520 1,2,2,2,4,20,4020,23086860,13991331508857930,
%T A375520 6090228896601444631429868134927310,
%U A375520 9346903779275810940456996749711484938792041307270162838305692061624510
%N A375520 a(n) = A375516(n)/LCM{1,...,n}.
%C A375520 It is a theorem of _Rémy Sigrist_ (see the proof in A374983) that a(n) is an integer.
%H A375520 Alois P. Heinz, <a href="/A375520/b375520.txt">Table of n, a(n) for n = 0..14</a>
%p A375520 s:= proc(n) s(n):= `if`(n=0, 0, s(n-1)+1/(n*b(n))) end:
%p A375520 b:= proc(n) b(n):= 1+floor(1/((1-s(n-1))*n)) end:
%p A375520 a:= n-> denom(s(n))/ilcm($1..n):
%p A375520 seq(a(n), n=0..10);  # _Alois P. Heinz_, Oct 19 2024
%t A375520 s[n_] := s[n] = If[n == 0, 0, s[n - 1] + 1/(n*b[n])];
%t A375520 b[n_] := b[n] = 1 + Floor[1/((1 - s[n - 1])*n)];
%t A375520 a[n_] := If[n == 0, 1, Denominator[s[n]]/LCM @@ Range[n]];
%t A375520 Table[a[n], {n, 0, 10}] (* _Jean-François Alcover_, Feb 14 2025, after _Alois P. Heinz_ *)
%o A375520 (Python)
%o A375520 from itertools import count, islice
%o A375520 from math import gcd, lcm
%o A375520 def A375520_gen(): # generator of terms
%o A375520     p, q, c = 0, 1, 1
%o A375520     for k in count(1):
%o A375520         m = q//(k*(q-p))+1
%o A375520         p, q = p*k*m+q, k*m*q
%o A375520         p //= (r:=gcd(p,q))
%o A375520         q //= r
%o A375520         c = lcm(c,k)
%o A375520         yield q//c
%o A375520 A375520_list = list(islice(A375520_gen(),11)) # _Chai Wah Wu_, Aug 28 2024
%Y A375520 Cf. A003418, A374663, A374983, A375516.
%K A375520 nonn
%O A375520 0,2
%A A375520 _N. J. A. Sloane_, Aug 28 2024
%E A375520 a(0)=1 prepended by _Alois P. Heinz_, Oct 19 2024