%I #23 Jan 08 2025 18:32:19
%S 5,11,17,29,71,197,269,1277,1289,1607,2027,2111,2267,2687,3467,4649,
%T 6359,6761,6827,7877,9461,10529,12917,13337,13691,13829,13931,17291,
%U 17579,20441,20771,26249,29021,29129,34589,34649,38237,39239,44027,47417,49547,51347
%N Lesser twin prime p such that p^2-p-2 is the average of a larger twin prime pair.
%C There are 265364 members of this sequence up to 10^10, so about 1% of twin primes with fewer than 10 digits are in this sequence. - _Charles R Greathouse IV_, Nov 12 2013
%H Michael G. Kaarhus, <a href="/A231652/b231652.txt">Table of n, a(n) for n = 1..10000</a>
%H M. G. Kaarhus, <a href="http://www.christaboveme.com/pri/newprime.pdf">newprime.pdf</a>
%e 17 is in this sequence because 17 is a lesser twin prime and 17^2 - 17 - 2 is the average of 269 and 271 which is a pair of twin primes.
%o (Maxima) y:0$ p:0$ c:0$ f(p):= p^2-p-2$ for p:5 thru 100000 step 6 do (if(primep(p) and primep(p+2)) then (y:f(p), if(primep(y-1) and primep(y+1)) then (c:c+1, print(c,", ",p,", ", y))));
%o (PARI) is(n)=isprime(n^2-n-3) && isprime(n^2-n-1) && isprime(n+2) && isprime(n) && n>3 \\ _Charles R Greathouse IV_, Nov 12 2013
%Y Subsequence of A001359.
%K nonn
%O 1,1
%A _Michael G. Kaarhus_, Nov 12 2013