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.

A289123 Numbers n such that (n-2,n) are twin primes, and (n,n+2) are twin lucky numbers.

Original entry on oeis.org

7, 13, 31, 73, 193, 283, 619, 643, 883, 1021, 1093, 1231, 2083, 2113, 2971, 3121, 3259, 4129, 4483, 4519, 5233, 6271, 6661, 6763, 7549, 7591, 8221, 9421, 10069, 10459, 10531, 11833, 12163, 13009, 13693, 13723, 13831, 17209, 17389, 20149, 20509, 21013, 21613
Offset: 1

Views

Author

Amiram Eldar, Jun 25 2017

Keywords

Comments

Intersection of A006512 and A031158. Subsequence of A031157. The other case in which (n-2,n) are twin lucky numbers, and (n,n+2) are twin primes has only one solution, n = 3, since twin primes are of the form (6k-1, 6k+1) (except for 3 and 5) and 6k-1 is never lucky.

Examples

			7 is in the sequence since (5,7) are twin primes, and (7,9) are twin lucky numbers.
		

Crossrefs

Programs

  • Mathematica
    L = Table[2*i + 1, {i, 0, 10^5}]; For[n = 2, n < Length[L], r = L[[n++]]; L = ReplacePart[L, Table[r*i -> Nothing, {i, 1, Length[L]/r}]]]; L[[Select[Range[1, Length[L] - 1], PrimeQ[L[[#]] - 2] && PrimeQ [L[[#]]] && L[[# + 1]] == L[[#]] + 2 &]]] (* after Jean-François Alcover at A000959 *)