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.

A098084 a(n) satisfies P(n) + P(n+1) + a(n) = least prime >= P(n) + P(n+1), where P(i)=i-th prime.

Original entry on oeis.org

0, 3, 1, 1, 5, 1, 1, 1, 1, 1, 3, 1, 5, 7, 1, 1, 7, 3, 1, 5, 5, 1, 1, 5, 1, 7, 1, 7, 1, 1, 5, 1, 1, 5, 7, 3, 11, 1, 7, 1, 7, 1, 5, 7, 1, 9, 5, 7, 1, 1, 7, 7, 7, 1, 1, 9, 1, 9, 5, 5, 1, 1, 1, 7, 1, 5, 5, 7, 5, 7, 7, 1, 3, 5, 7, 1, 1, 11, 1, 1, 13, 1, 13, 5, 1, 15, 1, 1, 5, 7, 1, 1, 5, 1, 7, 1, 1, 5, 5, 3, 5, 3, 19
Offset: 1

Views

Author

Pierre CAMI, Sep 13 2004

Keywords

Comments

a(n) = 1 iff prime(n) is in A177017. - Robert Israel, Feb 04 2020

Examples

			P(1) + P(2) = 2 + 3 = 5; least prime >= 5 = 5, so a(1)=0.
P(2) + P(3) = 3 + 5 = 8; least prime > 8 = 11, so a(2) = 11 - 8 = 3.
P(3) + P(4) = 5 + 7 = 12; least prime > 12 = 13, so a(3) = 13 - 12 = 1.
		

Crossrefs

The primes are in A098085.
Cf. A177017.

Programs

  • Maple
    P:= [seq(ithprime(i),i=1..200)]:
    map(t -> nextprime(t-1)-t,P[1..-2]+P[2..-1]); # Robert Israel, Feb 04 2020
  • Mathematica
    f[n_] := Block[{k = 0, p = Prime[n] + Prime[n + 1]}, While[ !PrimeQ[p + k], k++ ]; k]; Table[ f[n], {n, 103}] (* Robert G. Wilson v, Sep 24 2004 *)

Extensions

More terms from Robert G. Wilson v, Sep 25 2004