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.

A348301 a(n) is the difference between the numerator and denominator of the (reduced) fraction Sum_{i = 1..n} 1/prime(i).

This page as a plain text file.
%I A348301 #25 Feb 05 2023 17:56:46
%S A348301 -1,-1,1,37,617,10331,205657,4417993,111313529,3451185211,
%T A348301 113456434771,4398448576657,187757129777747,8377806843970331,
%U A348301 406839682998275587,22177392981497097521,1341055344385518798469,83727136357670859345679,5727006517323354547143763
%N A348301 a(n) is the difference between the numerator and denominator of the (reduced) fraction Sum_{i = 1..n} 1/prime(i).
%H A348301 Harvey P. Dale, <a href="/A348301/b348301.txt">Table of n, a(n) for n = 1..350</a>
%F A348301 a(n) = (Sum_{i = 1..n} p_n# / p_i) - p_n# where p_n# is the primorial of the n-th prime.
%F A348301 a(n) = A024451(n) - A002110(n).
%e A348301 a(1) = (p_1# / p_1) - p_1 = (2 / 2) - 2 = -1.
%e A348301 a(2) = (p_2# / p_1 + p_2# * p_2) - p_1 * p_2 = (6 / 2 + 6 / 3) - 2 * 3 = -1.
%e A348301 a(3) = 2*3*5/2 + 2*3*5/3 + 2*3*5/5 - 2*3*5 = 31 - 30 = 1.
%t A348301 Numerator[#]-Denominator[#]&/@Accumulate[1/Prime[Range[20]]] (* _Harvey P. Dale_, Feb 05 2023 *)
%o A348301 (Python)
%o A348301 from itertools import islice
%o A348301 from sympy import primorial, sieve
%o A348301 def a(n): return sum(primorial(n) // p for p in islice(sieve, n)) - primorial(n) # _Greg Tener_, Oct 18 2021
%o A348301 (PARI) a(n) = my(q=sum(i=1, n, 1/prime(i))); numerator(q)-denominator(q); \\ _Michel Marcus_, Oct 18 2021
%Y A348301 Cf. A024451 (numerators), A002110 (denominators).
%K A348301 sign
%O A348301 1,4
%A A348301 _Greg Tener_, Oct 10 2021