[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A266882
Primes p(n) such that p(n) + p(n+3) = p(n+1) + p(n+2) and p(n) + p(n+4) = p(n+2) + p(n+3).
0
13, 37, 223, 1087, 1423, 1483, 2683, 4783, 6079, 7331, 7547, 11057, 12269, 12401, 12641, 17333, 19471, 20743, 21799, 23027, 27733, 28097, 29017, 29389, 30631, 30859, 33191, 33343, 33587, 33613, 35527, 36551, 42457, 44263, 45817, 48857, 49459, 54499, 55813, 57329, 58151, 59207
OFFSET
1,1
COMMENTS
All terms = {1, 5} mod 6. - Muniru A Asiru, Aug 19 2017
EXAMPLE
Starting from 13, the five consecutive primes are 13, 17, 19, 23, 29; and they satisfy 13 + 23 = 17 + 19 and 13 + 29 = 23 + 19. So 13 is in the sequence.
MAPLE
for i from 1 to 10^5 do if ithprime(i)+ithprime(i+3) = ithprime(i+1)+ithprime(i+2) and ithprime(i)+ithprime(i+4) = ithprime(i+2)+ithprime(i+3) then print(ithprime(i)); fi; od; # Muniru A Asiru, Aug 19 2017
MATHEMATICA
Prime@ Select[Range@ 6000, And[Prime@ # + Prime[# + 3] == Prime[# + 1] + Prime[# + 2], Prime@ # + Prime[# + 4] == Prime[# + 2] + Prime[# + 3]] &] (* Michael De Vlieger, Jan 05 2016 *)
PROG
(Python)
from sympy import primerange
b, c, d, e = 2, 3, 5, 7
for p in primerange(11, 10**9):
... a, b, c, d, e = b, c, d, e, p
... if a + d == b + c and a + e == c + d:
....... print a
(PARI) lista(nn) = {for (n=1, nn, if ((prime(n) + prime(n+3) == prime(n+1) + prime(n+2)) && (prime(n) + prime(n+4) == prime(n+2) + prime(n+3)), print1(prime(n), ", ")); ); } \\ Michel Marcus, Jan 05 2016
(GAP)
K:=10^7+1;; # to get all terms <= K.
P:=Filtered([1, 3..K], IsPrime);;
A:=[];; for n in [1..Length(P)-4] do if P[n]+P[n+3]=P[n+1]+P[n+2] and P[n]+P[n+4]=P[n+2]+P[n+3] then Add(A, P[n]); fi; od; A; # Muniru A Asiru, Aug 19 2017
CROSSREFS
Subsequence of A022885.
Sequence in context: A155236 A155277 A090042 * A078952 A206279 A130621
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Michel Marcus, Jan 05 2016
STATUS
approved