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.

A095389 a(n) is the number of residues from reduced residue system, R, modulo 210 such that both R and R+2 are primes, i.e., both 210n+r and 210n+r+2 are primes at fixed n.

Original entry on oeis.org

13, 7, 6, 5, 5, 4, 6, 5, 5, 6, 6, 2, 6, 2, 3, 6, 7, 3, 4, 6, 6, 4, 5, 4, 2, 3, 6, 4, 1, 4, 2, 5, 5, 3, 4, 4, 2, 2, 2, 4, 3, 2, 5, 2, 5, 2, 4, 4, 3, 5, 2, 2, 4, 2, 3, 2, 4, 4, 3, 1, 1, 4, 1, 2, 0, 6, 5, 2, 3, 4, 1, 0, 4, 1, 5, 1, 4, 3, 1, 3, 3, 3, 3, 3, 5, 7, 3, 2, 2, 0, 3, 3, 4, 2, 3, 4, 2, 4, 4, 3, 4, 2, 6, 3, 1
Offset: 0

Views

Author

Labos Elemer and Enoch Haga, Jun 15 2004

Keywords

Comments

Since arbitrarily large prime gaps occur, several consecutive zeros may arise in the sequence.

Examples

			n=0: only 13+2=15 integers correspond to the condition: {11,17,29,41,59,71,101,107,137,149,179,191,197}, so a[0]=13; see A078859.
n=11: only 2 twins were found, {2339,2341} and {2381,2383} corresponding to residue pairs {29,31} and {71,73}.
		

Crossrefs

Programs

  • Mathematica
    {k =0, ta=Table[0, {100}]}; Do[{m=0};Do[s=210k+r;s1=210k+r+2; If[PrimeQ[s]&&PrimeQ[s+2], m=m+1], {r, 1, 210}];ta[[k]]=m, {k, 1, 100}];ta
    (* Second program: *)
    With[{P = Product[Prime@ i, {i, 4}]}, Function[R, Array[Count[R + P #, k_ /; Times @@ Boole@ PrimeQ@ {k, k + 2} == 1] &, 105, 0]]@ Select[Partition[Select[Range[P + 1], CoprimeQ[#, P] &], 2, 1], Differences@ # == {2} &][[All, 1]]] (* Michael De Vlieger, May 15 2017 *)