login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A289123
Numbers n such that (n-2,n) are twin primes, and (n,n+2) are twin lucky numbers.
1
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,1
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.
LINKS
EXAMPLE
7 is in the sequence since (5,7) are twin primes, and (7,9) are twin lucky numbers.
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amiram Eldar, Jun 25 2017
STATUS
approved