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.

A238234 Decimal expansion of the alternating sum 1/p(1) - 1/(p(2)*p(3)) + 1/(p(4)*p(5)*p(6)) - 1/(p(7)*p(8)*p(9)*p(10)) + ..., where p(n) is the n-th prime.

Original entry on oeis.org

4, 3, 4, 3, 2, 7, 7, 0, 3, 1, 9, 6, 9, 3, 8, 1, 0, 2, 2, 9, 6, 1, 5, 7, 5, 1, 3, 0, 2, 4, 8, 3, 7, 2, 3, 6, 7, 4, 2, 7, 9, 1, 3, 8, 9, 2, 7, 7, 1, 9, 6, 7, 7, 9, 3, 8, 5, 5, 2, 6, 0, 1, 4, 1, 4, 4, 2, 1, 1, 5, 0, 5, 4, 1, 6, 0, 9, 4, 6, 8, 0, 4, 0, 7, 3, 8, 9, 6, 1, 9, 8, 6, 8, 6, 1, 4, 2, 9, 1, 5, 2, 7, 8, 5, 7
Offset: 0

Views

Author

Paolo P. Lava, Feb 27 2014 - following a suggestion of Jean-François Alcover

Keywords

Comments

Absolute difference between this number and A139395 is about 0.1333426...

Examples

			0.4343277031969381022961575130248372367427913892771967793855...
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local a, b, i, j, k; a:=0.5; k:=1; for i from 2 by 1 to n do b:=1; for j from k by 1 to k+i-1 do b:=b*1/ithprime(j+1); od; k:=j; a:=evalf(a+b*(-1)^(i-1), 105); od; print(a); end: P(100);
  • Mathematica
    digits = 105; n0 = 10; dn = 10; t[n_] := n*(n + 1)/2; Clear[p]; p[n_] := p[n] = Sum[(-1)^(k + 1)/Product[Prime[j], {j, t[k] - k + 1, t[k]}], {k, 1, n}] // N[#, digits] &; p[n0]; p[n = n0 + dn]; While[RealDigits[p[n]] != RealDigits[p[n - dn]], Print["n = ", n]; n = n + dn]; RealDigits[p[n], 10, digits] // First (* Jean-François Alcover, Aug 12 2014, adapted from PARI *)
  • PARI
    default(realprecision, 120);
    T(n) = n*(n + 1)/2; \\ T(n) = A000217(n).
    sum(k = 1, 100, (-1.)^(k-1)/prod(j = T(k) - k + 1, T(k), prime(j))) \\ Rick L. Shepherd, Mar 07 2014

Extensions

More terms from and offset corrected by Rick L. Shepherd, Mar 07 2014