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.

A369508 Decimal expansion of Sum_{n>=1} prime(n)*(-1/2)^n (negated).

Original entry on oeis.org

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

Views

Author

Pierluigi Failla, Jan 25 2024

Keywords

Examples

			0.662729784185267965388337694463998...
		

Crossrefs

Cf. A098990.

Programs

  • Mathematica
    First[RealDigits[Sum[Prime[n](-2)^-n,{n,1000}],10,85]] (* James C. McMahon, Jan 29 2024 *)
  • PARI
    suminf(k=1, prime(k)/(-2)^k) \\ Michel Marcus, Jan 25 2024
  • Python
    from sympy import prime
    from decimal import Decimal, getcontext
    getcontext().prec = 100
    def f(k):
        if k == 1:
            return prime(k) * Decimal(-0.5)
        return f(k-1) + prime(k) * Decimal(-0.5) ** k