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.

This page as a plain text file.
%I A289123 #10 Nov 19 2019 03:35:30
%S A289123 7,13,31,73,193,283,619,643,883,1021,1093,1231,2083,2113,2971,3121,
%T A289123 3259,4129,4483,4519,5233,6271,6661,6763,7549,7591,8221,9421,10069,
%U A289123 10459,10531,11833,12163,13009,13693,13723,13831,17209,17389,20149,20509,21013,21613
%N A289123 Numbers n such that (n-2,n) are twin primes, and (n,n+2) are twin lucky numbers.
%C A289123 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.
%H A289123 Amiram Eldar, <a href="/A289123/b289123.txt">Table of n, a(n) for n = 1..10000</a>
%e A289123 7 is in the sequence since (5,7) are twin primes, and (7,9) are twin lucky numbers.
%t A289123 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 *)
%Y A289123 Cf. A006512, A000959, A031157, A031158.
%K A289123 nonn
%O A289123 1,1
%A A289123 _Amiram Eldar_, Jun 25 2017