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.

A060266 Difference between 2n and the following prime.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 5, 3, 1, 1, 5, 3, 1, 3, 1, 1, 3, 1, 5, 3, 1, 5, 3, 1, 1, 5, 3, 1, 3, 1, 1, 5, 3, 1, 3, 1, 5, 3, 1, 7, 5, 3, 1, 3, 1, 1, 3, 1, 1, 3, 1, 13, 11, 9, 7, 5, 3, 1, 3, 1, 5, 3, 1, 1, 9, 7, 5, 3, 1, 1, 5, 3, 1, 5, 3, 1, 3, 1, 5, 3, 1, 5, 3, 1, 1, 9, 7, 5, 3, 1, 1, 3, 1, 1, 11, 9, 7, 5
Offset: 1

Views

Author

Labos Elemer, Mar 23 2001

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory): [seq(nextprime(2*i)-2*i,i=1..256)];
  • Mathematica
    d2n[n_]:=Module[{c=2n},NextPrime[c]-c]; Array[d2n,120] (* Harvey P. Dale, May 14 2011 *)
    Table[NextPrime@ # - # &[2 n], {n, 120}] (* Michael De Vlieger, Feb 18 2017 *)
  • PARI
    a(n) = nextprime(2*n+1) - 2*n; \\ Michel Marcus, Feb 19 2017

Formula

Conjecture: Limit_{n->oo} (Sum_{k=1..n} a(k)) / (Sum_{k=1..n} log(2*k)) = 1. - Alain Rocchelli, Oct 24 2023