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.

Showing 1-3 of 3 results.

A189759 Numbers pqr such that pq + pr + qr is prime, where p, q, and r are primes.

Original entry on oeis.org

30, 42, 66, 70, 78, 105, 114, 130, 154, 165, 174, 182, 222, 231, 238, 246, 255, 273, 282, 285, 286, 310, 318, 345, 357, 366, 370, 385, 399, 418, 430, 434, 442, 455, 465, 474, 483, 494, 498, 518, 555, 561, 574, 582, 595, 602, 609, 618, 642, 645, 651, 663, 665
Offset: 1

Views

Author

T. D. Noe, Apr 27 2011

Keywords

Comments

The number pq+pr+qr is prime only if p, q, and r are distinct. The primes of form pq+pr+qr are in A087054. A prime may have multiple representations as pq+pr+qr; for example, 2*3*13 and 3*5*7 both produce the prime 71.
As mentioned by Ufnarovski and Ahlander, if pq+pr+qr is prime, then the arithmetic derivative (A003415) of pqr is that prime. They conjecture that this sequence and A087054 are infinite.

Crossrefs

Programs

  • Mathematica
    pqr[nn_] := Module[{p=Prime[Range[PrimePi[nn/6]+1]],i,j,k,n,prod}, Sort[Reap[i=0; While[i++; p[[i]]p[[i+1]]p[[i+2]] <= nn, j=i; While[j++; p[[i]]p[[j]]p[[j+1]] <= nn, k=j; While[k++; prod=p[[i]]p[[j]]p[[k]]; prod <= nn, n=p[[i]]p[[j]]+p[[i]]p[[k]]+p[[j]]p[[k]]; If[PrimeQ[n], Sow[prod]]]]]][[2,1]]]]; pqr[1000]
    Take[Union[Times@@@Select[Subsets[Prime[Range[30]],{3}],PrimeQ[ Total[ Times@@@Subsets[#,{2}]]]&]],60](* Harvey P. Dale, Dec 29 2011 *)

A356471 First of 5 consecutive primes p,q,r,s,t such that p*q+ q*r + r*s + s*t + t*p is prime.

Original entry on oeis.org

19, 41, 47, 53, 157, 199, 491, 557, 563, 571, 647, 1063, 1091, 1097, 1109, 1163, 1171, 1217, 1259, 1279, 1361, 1367, 1487, 1601, 1621, 1753, 1901, 1951, 2053, 2161, 2383, 2441, 2549, 2777, 2851, 2879, 2887, 2953, 2957, 3041, 3061, 3067, 3163, 3191, 3491, 3499, 3719, 3881, 4003, 4007, 4013, 4093
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Aug 08 2022

Keywords

Examples

			a(3) = 47 is a term because 47, 53, 59, 61, 67 are 5 consecutive primes with 47*53 + 53*59 + 59*61 + 61*67 + 67*47 = 16453 prime.
		

Crossrefs

Programs

  • Maple
    R:= NULL: count:= 0:
    P:= Vector(5,ithprime):
    while count < 100 do
      x:= P[1]*P[2]+P[2]*P[3]+P[3]*P[4]+P[4]*P[5]+P[5]*P[1];
      if isprime(x) then R:= R, P[1]; count:= count+1 fi;
      P[1..4]:= P[2..5];
      P[5]:= nextprime(P[5]);
    od:
    R;
  • Mathematica
    Select[Partition[Prime[Range[600]], 5, 1], PrimeQ[Total[# * RotateLeft[#]]] &][[;; , 1]] (* Amiram Eldar, Aug 08 2022 *)
  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def agen():
        p, q, r, s, t = 2, 3, 5, 7, 11
        while True:
            if isprime(p*q + q*r + r*s + s*t + t*p): yield p
            p, q, r, s, t = q, r, s, t, nextprime(t)
    print(list(islice(agen(), 52))) # Michael S. Branicky, Aug 08 2022

A356477 a(n) is the start of the first sequence of 2*n+1 consecutive primes p_1, p_2, ..., p_(2*n+1) such that p_1*p_2 + p_2*p_3 + ... + p_(2*n)*p_(2*n+1) + p_(2*n+1)*p_1 is prime.

Original entry on oeis.org

2, 19, 19, 2, 23, 2, 7, 7, 2, 5, 113, 5, 29, 13, 67, 53, 11, 11, 5, 23, 7, 43, 5, 2, 31, 73, 13, 3, 89, 5, 11, 3, 89, 31, 43, 2, 37, 2, 23, 7, 11, 19, 43, 23, 5, 2, 23, 3, 29, 5, 17, 3, 31, 29, 53, 29, 7, 13, 73, 3, 5, 43, 29, 17, 5, 37, 19, 11, 71, 7, 2, 43, 13, 19, 2, 59, 7, 29, 113, 13, 5, 11
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Aug 08 2022

Keywords

Examples

			a(2) = 19 because 19 is the start of the 2*2+1 = 5 consecutive primes 19, 23, 29, 31, 37 with 19*23 + 23*29 + 29*31 + 31*37 + 37*19 = 3853 prime, and no earlier 5-tuple of consecutive primes works.
		

Crossrefs

Programs

  • Maple
    f:= proc(m) local P,x,i,n;
      n:= 2*m+1;
      P:= Vector(n,ithprime);
    do
       x:= add(P[i]*P[i+1],i=1..n-1)+P[n]*P[1];
       if isprime(x) then return P[1] fi;
       P[1..n-1]:= P[2..n];
       P[n]:= nextprime(P[n]);
    od
    end proc:
    map(f, [$1..100]);
  • Python
    from sympy import isprime, nextprime, prime, primerange
    def a(n):
        p = list(primerange(1, prime(2*n+1)+1))
        while True:
            if isprime(sum(p[i]*p[i+1] for i in range(len(p)-1))+p[-1]*p[0]):
                return p[0]
            p = p[1:] + [nextprime(p[-1])]
    print([a(n) for n in range(1, 83)]) # Michael S. Branicky, Aug 08 2022
Showing 1-3 of 3 results.