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}.

Original entry on oeis.org

1, 2, 2, 2, 4, 20, 4020, 23086860, 13991331508857930, 6090228896601444631429868134927310, 9346903779275810940456996749711484938792041307270162838305692061624510
Offset: 0

Views

Author

N. J. A. Sloane, Aug 28 2024

Keywords

Comments

It is a theorem of Rémy Sigrist (see the proof in A374983) that a(n) is an integer.

Crossrefs

Programs

  • Maple
    s:= proc(n) s(n):= `if`(n=0, 0, s(n-1)+1/(n*b(n))) end:
    b:= proc(n) b(n):= 1+floor(1/((1-s(n-1))*n)) end:
    a:= n-> denom(s(n))/ilcm($1..n):
    seq(a(n), n=0..10);  # Alois P. Heinz, Oct 19 2024
  • Mathematica
    s[n_] := s[n] = If[n == 0, 0, s[n - 1] + 1/(n*b[n])];
    b[n_] := b[n] = 1 + Floor[1/((1 - s[n - 1])*n)];
    a[n_] := If[n == 0, 1, Denominator[s[n]]/LCM @@ Range[n]];
    Table[a[n], {n, 0, 10}] (* Jean-François Alcover, Feb 14 2025, after Alois P. Heinz *)
  • Python
    from itertools import count, islice
    from math import gcd, lcm
    def A375520_gen(): # generator of terms
        p, q, c = 0, 1, 1
        for k in count(1):
            m = q//(k*(q-p))+1
            p, q = p*k*m+q, k*m*q
            p //= (r:=gcd(p,q))
            q //= r
            c = lcm(c,k)
            yield q//c
    A375520_list = list(islice(A375520_gen(),11)) # Chai Wah Wu, Aug 28 2024

Extensions

a(0)=1 prepended by Alois P. Heinz, Oct 19 2024