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.

A104120 a(n) = (prime(n + 1) - prime(n))/2 (mod 2).

Original entry on oeis.org

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

Views

Author

Joseph L. Pe, Mar 06 2005

Keywords

Comments

Questions: Is s(n) = (1/n)*Sum_{i=2..n+1} a(i) > 1/2 for all n? Does s(n) --> 1/2?

Examples

			a(1) = (prime(2 + 1) - prime(2))/2 (mod 2) = (5 - 3)/2 (mod 2) = 1 mod 2 = 1.
		

Crossrefs

Sequences related to the differences between successive primes: A001223 (Delta(p)), A028334, A080378, A104120, A330556-A330561.

Programs

  • Mathematica
    Table[Mod[(Prime[i + 1] - Prime[i])/2, 2], {i, 2, 100}]
    Mod[(#[[2]]-#[[1]])/2,2]&/@Partition[Prime[Range[2,110]],2,1] (* Harvey P. Dale, Oct 01 2018 *)