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.

A375781 Lexicographically earliest sequence of positive integers a(1), a(2), a(3), ... such that for any n > 0, Sum_{k = 1..n} 1 / (prime(k)*a(k)) < 1 (where prime(k) denotes the k-th prime number).

Original entry on oeis.org

1, 1, 2, 3, 5, 89, 39304, 46994541278, 17331821184409051471456, 684945610024339520619912889548385212804350252, 454557097914340869696918952726502107711786801276885341616727617337826266151394840009711293
Offset: 1

Views

Author

Rémy Sigrist, Aug 28 2024

Keywords

Comments

The sum of the reciprocals of the primes diverges. We divide each of its terms in such a way as to have a series bounded by 1.

Examples

			The first terms, alongside the corresponding sums, are:
  n  a(n)   Sum_{k=1..n} 1/(prime(k)*a(k))
  -  -----  ------------------------------
  1      1  1/2
  2      1  5/6
  3      2  14/15
  4      3  103/105
  5      5  1154/1155
  6     89  1336333/1336335
  7  39304  892896284279/892896284280
		

Crossrefs

Programs

  • Maple
    s:= proc(n) s(n):= `if`(n=0, 0, s(n-1)+1/(ithprime(n)*a(n))) end:
    a:= proc(n) a(n):= 1+floor(1/((1-s(n-1))*ithprime(n))) end:
    seq(a(n), n=1..11);  # Alois P. Heinz, Oct 18 2024
  • Mathematica
    s[n_] := s[n] = If[n == 0, 0, s[n-1] + 1/(Prime[n]*a[n])];
    a[n_] := a[n] = 1 + Floor[1/((1 - s[n-1])*Prime[n])];
    Table[a[n], {n, 1, 11}] (* Jean-François Alcover, Mar 19 2025, after Alois P. Heinz *)
  • PARI
    { r = 1; forprime (p = 2, prime(11), print1 (a = floor(1/(r*p)) + 1", "); r -= 1 / (a*p);); }
    
  • Python
    from itertools import islice
    from math import gcd
    from sympy import nextprime
    def A375781_gen(): # generator of terms
        p, q, k = 0, 1, 1
        while (k:=nextprime(k)):
            yield (m:=q//(k*(q-p))+1)
            p, q = p*k*m+q, k*m*q
            p //= (r:=gcd(p,q))
            q //= r
    A375781_list = list(islice(A375781_gen(),11)) # Chai Wah Wu, Aug 30 2024