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.

A106671 a(n) = ( prime(n + 2) * prime(n) - prime(n + 1)^2 ) modulo 3.

Original entry on oeis.org

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

Views

Author

Roger L. Bagula, May 13 2005

Keywords

Crossrefs

Programs

  • Mathematica
    a = Table[Mod[Prime[n + 2]*Prime[n] - Prime[n + 1]^2, 3], {n, 1, 200}]
    Mod[#[[3]]#[[1]]-#[[2]]^2,3]&/@Partition[Prime[Range[110]],3,1] (* Harvey P. Dale, Oct 03 2015 *)
  • PARI
    a(n) = (prime(n + 2)*prime(n) - prime(n + 1)^2) % 3; \\ Michel Marcus, Apr 21 2017

Formula

a(n) = A056221(n) mod 3 = A010872(A056221(n)). - Michel Marcus, Apr 21 2017