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.
%I A295705 #28 Jul 27 2024 07:38:12 %S A295705 3,5,7,11,13,17,19,31,37,41,43,61,67,73,79,83,97,101,103,107,127,157, %T A295705 163,191,193,197,223,227,229,271,277,307,311,347,349,353,359,373,379, %U A295705 383,433,439,443,457,461,499,509,607,613,617,619,641,643,659,673,677,719 %N A295705 The first of a pair of alternate primes the difference between which is twice a prime. %C A295705 Symbolically, the sequence is of p = prime(i) where q = (prime(i + 2) - prime(i))/2 and p and q are prime. %C A295705 An examination of the first 10^9 primes (using Mathematica) shows that the largest value of q is 157 and it occurs just once: where p = 1907251013. %C A295705 prime(k+1) where A052288(k) is prime. - _Robert Israel_, Dec 04 2017 %C A295705 Number of terms less than 10^k: 0, 3, 17, 72, 454, 3034, 22222, 174228, ... - _Muniru A Asiru_, Jan 24 2018 %H A295705 Robert Israel, <a href="/A295705/b295705.txt">Table of n, a(n) for n = 1..10000</a> %e A295705 {3, 7} represents a pair of alternate primes, their difference is 4 which is twice a prime (2). Likewise, {787, 809}, their difference being twice 11. %p A295705 P:= select(isprime,[seq(i,i=3..10^4,2)]): %p A295705 P[select(t -> isprime((P[t+2]-P[t])/2), [$1..nops(P)-2])]; # _Robert Israel_, Dec 04 2017 %t A295705 For[p = 1, p < 100000001, p++, %t A295705 a = Prime[p]; %t A295705 b = Prime[p + 2]; %t A295705 q = (b - a)/2; %t A295705 If[PrimeQ[q] == True, Print[a, " ", b, " ", q]]; %t A295705 ] (* Marnell *) %t A295705 Select[Prime[Range[1000]], PrimeQ[(NextPrime[#, 2] - #)/2] &] (* _Alonso del Arte_, Nov 25 2017 *) %t A295705 searchMax = 200; primes = Prime[Range[searchMax + 2]]; halfAlternPrimeDiffs = Table[(primes[[n + 2]] - primes[[n]])/2, {n, searchMax}]; primes[[Select[Range[searchMax], PrimeQ[halfAlternPrimeDiffs[[#]]] &]]] (* _Alonso del Arte_, Nov 26 2017 *) %t A295705 Select[{#1, #2, (#2 - #1)/2} & @@ # & /@ Transpose@ {Take[#, Length@ # - 2], Drop[#, 2]} &@ Prime@ Range@ 130, PrimeQ@ Last@ # &][[All, 1]] (* _Michael De Vlieger_, Dec 04 2017 *) %t A295705 Select[Partition[Prime[Range[200]],3,1],PrimeQ[(#[[3]]-#[[1]])/2]&][[All,1]] (* _Harvey P. Dale_, Feb 20 2020 *) %o A295705 (PARI) lista(nn) = {precp = 3; precq = 5; forprime(p=7, nn, if (isprime((p-precp)/2), print1(precp, ", ")); precp = precq; precq = p;);} \\ _Michel Marcus_, Jan 08 2018 %o A295705 (GAP) P:=Filtered([3..10^4], IsPrime);; %o A295705 B := List([1..Length(P)-2],i->(P[i+2]-P[i])/2);; %o A295705 o := [];; for i in [1..Length(B)] do if IsPrime(B[i]) then Add(o,P[i]); fi; od; o := A295705; # _Muniru A Asiru_, Jan 24 2018 %Y A295705 Cf. A000040, A052288. %K A295705 nonn %O A295705 1,1 %A A295705 _Geoffrey Marnell_, Nov 25 2017