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.

A131695 a(n) = 0 iff 2*prime(n+1) = prime(n) + prime(n+2), otherwise a(n) = 1.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1
Offset: 1

Views

Author

Giovanni Teofilatto, Sep 15 2007

Keywords

Crossrefs

Cf. A001223, A122535, A064113 (positions of zeros).

Programs

  • Mathematica
    Table[Boole[2 Prime[n + 1] != Prime@ n + Prime[n + 2]], {n, 120}] (* Michael De Vlieger, Dec 17 2016 *)
  • PARI
    A131695(n) = ((2*prime(1+n)) != (prime(n)+prime(2+n))); \\ Antti Karttunen, Aug 30 2017

Formula

a(n) = A098726(n) - 2. - Filip Zaludek, Dec 16 2016

Extensions

Definition and values corrected, keyword:cons removed; R. J. Mathar, Apr 22 2010