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.
%I A375781 #19 Mar 19 2025 10:13:11 %S A375781 1,1,2,3,5,89,39304,46994541278,17331821184409051471456, %T A375781 684945610024339520619912889548385212804350252, %U A375781 454557097914340869696918952726502107711786801276885341616727617337826266151394840009711293 %N 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). %C A375781 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. %H A375781 Alois P. Heinz, <a href="/A375781/b375781.txt">Table of n, a(n) for n = 1..14</a> %H A375781 N. J. A. Sloane, <a href="https://www.youtube.com/watch?v=3RAYoaKMckM">A Nasty Surprise in a Sequence and Other OEIS Stories</a>, Experimental Mathematics Seminar, Rutgers University, Oct 10 2024, Youtube video; <a href="https://sites.math.rutgers.edu/~zeilberg/expmath/sloane85BD.pdf">Slides</a> [Mentions this sequence] %H A375781 Wikipedia, <a href="https://en.wikipedia.org/wiki/Divergence_of_the_sum_of_the_reciprocals_of_the_primes">Divergence of the sum of the reciprocals of the primes</a> %e A375781 The first terms, alongside the corresponding sums, are: %e A375781 n a(n) Sum_{k=1..n} 1/(prime(k)*a(k)) %e A375781 - ----- ------------------------------ %e A375781 1 1 1/2 %e A375781 2 1 5/6 %e A375781 3 2 14/15 %e A375781 4 3 103/105 %e A375781 5 5 1154/1155 %e A375781 6 89 1336333/1336335 %e A375781 7 39304 892896284279/892896284280 %p A375781 s:= proc(n) s(n):= `if`(n=0, 0, s(n-1)+1/(ithprime(n)*a(n))) end: %p A375781 a:= proc(n) a(n):= 1+floor(1/((1-s(n-1))*ithprime(n))) end: %p A375781 seq(a(n), n=1..11); # _Alois P. Heinz_, Oct 18 2024 %t A375781 s[n_] := s[n] = If[n == 0, 0, s[n-1] + 1/(Prime[n]*a[n])]; %t A375781 a[n_] := a[n] = 1 + Floor[1/((1 - s[n-1])*Prime[n])]; %t A375781 Table[a[n], {n, 1, 11}] (* _Jean-François Alcover_, Mar 19 2025, after _Alois P. Heinz_ *) %o A375781 (PARI) { r = 1; forprime (p = 2, prime(11), print1 (a = floor(1/(r*p)) + 1", "); r -= 1 / (a*p);); } %o A375781 (Python) %o A375781 from itertools import islice %o A375781 from math import gcd %o A375781 from sympy import nextprime %o A375781 def A375781_gen(): # generator of terms %o A375781 p, q, k = 0, 1, 1 %o A375781 while (k:=nextprime(k)): %o A375781 yield (m:=q//(k*(q-p))+1) %o A375781 p, q = p*k*m+q, k*m*q %o A375781 p //= (r:=gcd(p,q)) %o A375781 q //= r %o A375781 A375781_list = list(islice(A375781_gen(),11)) # _Chai Wah Wu_, Aug 30 2024 %Y A375781 Cf. A000040, A374663. %K A375781 nonn %O A375781 1,3 %A A375781 _Rémy Sigrist_, Aug 28 2024