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.

A375521 a(n) is the numerator of Sum_{k = 1..n} 1 / (k*A375781(k)).

This page as a plain text file.
%I A375521 #18 Apr 22 2025 09:08:51
%S A375521 0,1,5,14,103,1154,1336333,892896284279,398631887241408183843479,
%T A375521 19863422690705846097977473796903171171326157279,
%U A375521 14091270035344566960604487534521565339065390839583445590118556137472614250693240040301050079
%N A375521 a(n) is the numerator of Sum_{k = 1..n} 1 / (k*A375781(k)).
%H A375521 Alois P. Heinz, <a href="/A375521/b375521.txt">Table of n, a(n) for n = 0..13</a>
%H A375521 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]
%e A375521 The first few fractions are 0/1, 1/2, 5/6, 14/15, 103/105, 1154/1155, 1336333/1336335, 892896284279/892896284280, ...
%p A375521 s:= proc(n) s(n):= `if`(n=0, 0, s(n-1)+1/(ithprime(n)*b(n))) end:
%p A375521 b:= proc(n) b(n):= 1+floor(1/((1-s(n-1))*ithprime(n))) end:
%p A375521 a:= n-> numer(s(n)):
%p A375521 seq(a(n), n=0..10);  # _Alois P. Heinz_, Oct 18 2024
%t A375521 s[n_] := s[n] = If[n == 0, 0, s[n - 1] + 1/(Prime[n]*b[n])];
%t A375521 b[n_] := b[n] = 1 + Floor[1/((1 - s[n - 1])*Prime[n])];
%t A375521 a[n_] := Numerator[s[n]];
%t A375521 Table[a[n], {n, 0, 10}] (* _Jean-François Alcover_, Apr 22 2025, after _Alois P. Heinz_ *)
%o A375521 (Python)
%o A375521 from itertools import islice
%o A375521 from math import gcd
%o A375521 from sympy import nextprime
%o A375521 def A375521_gen(): # generator of terms
%o A375521     p, q, k = 0, 1, 1
%o A375521     while (k:=nextprime(k)):
%o A375521         m=q//(k*(q-p))+1
%o A375521         p, q = p*k*m+q, k*m*q
%o A375521         p //= (r:=gcd(p,q))
%o A375521         q //= r
%o A375521         yield p
%o A375521 A375521_list = list(islice(A375521_gen(),11)) # _Chai Wah Wu_, Aug 30 2024
%Y A375521 Cf. A375781, A375522.
%K A375521 nonn,frac
%O A375521 0,3
%A A375521 _Rémy Sigrist_ and _N. J. A. Sloane_, Aug 30 2024
%E A375521 a(0)=0 prepended by _Alois P. Heinz_, Oct 18 2024