[go: up one dir, main page]

login
A295705
The first of a pair of alternate primes the difference between which is twice a prime.
1
3, 5, 7, 11, 13, 17, 19, 31, 37, 41, 43, 61, 67, 73, 79, 83, 97, 101, 103, 107, 127, 157, 163, 191, 193, 197, 223, 227, 229, 271, 277, 307, 311, 347, 349, 353, 359, 373, 379, 383, 433, 439, 443, 457, 461, 499, 509, 607, 613, 617, 619, 641, 643, 659, 673, 677, 719
OFFSET
1,1
COMMENTS
Symbolically, the sequence is of p = prime(i) where q = (prime(i + 2) - prime(i))/2 and p and q are prime.
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.
prime(k+1) where A052288(k) is prime. - Robert Israel, Dec 04 2017
Number of terms less than 10^k: 0, 3, 17, 72, 454, 3034, 22222, 174228, ... - Muniru A Asiru, Jan 24 2018
LINKS
EXAMPLE
{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.
MAPLE
P:= select(isprime, [seq(i, i=3..10^4, 2)]):
P[select(t -> isprime((P[t+2]-P[t])/2), [$1..nops(P)-2])]; # Robert Israel, Dec 04 2017
MATHEMATICA
For[p = 1, p < 100000001, p++,
a = Prime[p];
b = Prime[p + 2];
q = (b - a)/2;
If[PrimeQ[q] == True, Print[a, " ", b, " ", q]];
] (* Marnell *)
Select[Prime[Range[1000]], PrimeQ[(NextPrime[#, 2] - #)/2] &] (* Alonso del Arte, Nov 25 2017 *)
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 *)
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 *)
Select[Partition[Prime[Range[200]], 3, 1], PrimeQ[(#[[3]]-#[[1]])/2]&][[All, 1]] (* Harvey P. Dale, Feb 20 2020 *)
PROG
(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
(GAP) P:=Filtered([3..10^4], IsPrime);;
B := List([1..Length(P)-2], i->(P[i+2]-P[i])/2);;
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
CROSSREFS
Sequence in context: A179479 A038604 A155026 * A081092 A291360 A269326
KEYWORD
nonn
AUTHOR
Geoffrey Marnell, Nov 25 2017
STATUS
approved