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.

A375081 Smallest k>n such that the denominator of Sum {i=n..k} (1/i) is larger than the denominator of Sum {i=n..k+1} (1/i).

Original entry on oeis.org

5, 5, 5, 17, 17, 14, 14, 14, 14, 14, 32, 34, 34, 34, 27, 27, 27, 27, 23, 23, 27, 51, 51, 51, 51, 44, 44, 44, 44, 44, 39, 39, 39, 39, 39, 44, 74, 74, 74, 74, 74, 74, 74, 74, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 59, 71, 71, 71, 71, 71, 71, 71, 71, 76, 76, 76
Offset: 1

Views

Author

Ralf Stephan, Jul 29 2024

Keywords

Examples

			1/3+1/4+1/5=47/60 and 1/3+1/4+1/5+1/6=19/20, and 60>20, so a(3)=5.
		

Programs

  • PARI
    a(n) = for(k=0, oo, my(s=sum(n=n, n+k, 1/n)); if(denominator(s)>denominator(s+1/(n+k+1)), return(n+k); break))
    
  • Python
    from fractions import Fraction
    from itertools import count
    def A375081(n):
        a = Fraction((n<<1)+1,n*(n+1))
        for k in count(n+1):
            if a.denominator > (a:=a+Fraction(1,k+1)).denominator:
                return k # Chai Wah Wu, Jul 30 2024

Formula

a(n) < 4.374*n for all n > 1. - Wouter van Doorn, Nov 06 2024
a(n) > n + 0.54*log(n) for all large enough n, and there are infinitely many n with a(n) < n + 0.61*log(n). - Wouter van Doorn, Feb 06 2025

Extensions

a(56) onwards from Bhavik Mehta, Jul 31 2024