OFFSET
1,3
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.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..14
N. J. A. Sloane, A Nasty Surprise in a Sequence and Other OEIS Stories, Experimental Mathematics Seminar, Rutgers University, Oct 10 2024, Youtube video; Slides [Mentions this sequence]
EXAMPLE
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
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
PROG
(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
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Rémy Sigrist, Aug 28 2024
STATUS
approved