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.

User: Emmanuel Antonio José García

Emmanuel Antonio José García's wiki page.

Emmanuel Antonio José García has authored 1 sequences.

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).

Original entry on oeis.org

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

Author

Keywords

Comments

All terms = {1, 5} mod 6. - Muniru A Asiru, Aug 19 2017

Examples

			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.
		

Crossrefs

Subsequence of A022885.

Programs

  • 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
  • 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 *)
  • 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
    
  • 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, end=', ')
    

Extensions

More terms from Michel Marcus, Jan 05 2016