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.

A229993 Numbers for which c(n) - 1 and c(n) + 1 are twin primes, where c(n) = A061214(n) = product of composite numbers between prime(n) and prime(n+1) .

Original entry on oeis.org

2, 3, 5, 6, 7, 8, 10, 13, 14, 17, 20, 26, 28, 29, 33, 35, 41, 43, 45, 49, 52, 57, 60, 64, 69, 81, 83, 85, 89, 90, 91, 98, 104, 109, 113, 116, 120, 134, 140, 142, 144, 148, 152, 171, 173, 176, 178, 182, 190, 201, 202, 204, 206, 209, 212, 215, 225, 230, 234
Offset: 2

Views

Author

Clark Kimberling, Oct 09 2013

Keywords

Examples

			c(n) - 1:  3, 5, 719, 11, 3359, 17, 9239.
c(n) + 1: 5, 7, 721, 13, 3361, 19, 9241.  Here, for example, for we have twin primes except for n = 4, since 721 is not prime.
		

Crossrefs

Programs

  • Mathematica
    z = 400; c[n_] := Product[k, {k, Prime[n] + 1, Prime[n + 1] - 1}]; d[n_] := If[PrimeQ[c[n] - 1], 1, 0]; t1 = Table[d[n], {n, 1, z}]; u1 = Flatten[Position[t1, 1]]; e[n_] := If[PrimeQ[c[n] + 1], 1, 0]; t2 = Table[e[n], {n, 1, z}]; u2 = Flatten[Position[t2, 1]]; u = Intersection[u1, u2]
    pcnQ[n_]:=Module[{p=Times@@Range[Prime[n]+1,Prime[n+1]-1]},AllTrue[p+{1,-1},PrimeQ]]; Select[Range[250],pcnQ] (* Harvey P. Dale, Jan 28 2023 *)