login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A318158 Prime numbers of the form p1^4 + p2^3 + p3^2 + p4, where p1, p2, p3 and p4 are distinct primes. 1
79, 97, 103, 109, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Does this sequence contain every prime > 113? - Robert Israel, Aug 26 2018

From David A. Corneth, Aug 26 2018: (Start)

As the primes in the sum are distinct and has four terms, exactly one of (p1, p2, p3, p4) is 2.

Contains all the primes in [120, 5 * 10^7]. (End)

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

David A. Corneth, Statistic for computations using the PARI program below

David A. Corneth, PARI program

EXAMPLE

227 belongs to this sequence as 227 = 3^4 + 5^3 + 2^2 + 17, with 2, 3, 5 and 17 all primes.

MAPLE

N:= 1000: # to get all terms <= N

V:= Vector(N):

p1:= 1:

do

  p1:= nextprime(p1);

  if p1^4 > N then break fi;

  p2:= 1:

  do

    p2:= nextprime(p2);

    if p1^4 + p2^3 > N then break fi;

    if p2 = p1 then next fi;

    p3:= 1;

    do

      p3:= nextprime(p3);

      if p1^4 + p2^3 + p3^2 > N then break fi;

      if p3 = p1 or p3 = p2 then next fi;

      if min(p1, p2, p3)>2 then

         p4:= 2;

         x:= p1^4+p2^3+p3^2+p4;

         if isprime(x) then V[x]:= 1 fi;

      else

         p4:= 2;

         do

            p4:= nextprime(p4);

            if p1^4 + p2^3 + p3^2 + p4 > N then break fi;

            if p4 = p1 or p4 = p2 or p4 = p3 then next fi;

            x:= p1^4+p2^3+p3^2+p4;

            if isprime(x) then V[x]:= 1 fi;

          od

       fi

od od od:

select(t -> V[t]=1, [$1..N]); # Robert Israel, Aug 26 2018

MATHEMATICA

v[t_] := Prime@Range@PrimePi@t; up = 400; Union@Reap[ Do[ If[PrimeQ[p = p1^4 + p2^3 + p3^2 + p4] && (s = {p1, p2, p3, p4}; Sort@s == Union@s), Sow@p], {p1, v[ up^(1/4)]}, {p2, v@Sqrt[up - p1^4]}, {p3, v[up - p1^4 - p2^3]}, {p4, v[up - p1^4 - p2^3 - p3^2]}]][[2, 1]] (* Giovanni Resta, Aug 19 2018 *)

PROG

(Minizinc)

include "globals.mzn";

int: n = 4;

%to get all primes less than 250 of this sequence

int: max_val = 250;

array[1..n+1] of var 2..max_val: x;

% primes between 2..max_valset of int:

prime = 2..max_val diff { i | i in 2..max_val, j in 2..ceil(sqrt(i)) where i mod j = 0} ;

set of int: primes;

primes = prime union {2};

solve satisfy;

constraint all_different(x) /\

x[1] in primes /\

x[2] in primes /\

x[3] in primes /\

x[4] in primes /\

x[5] in primes /\

pow(x[4], 4)+pow(x[3], 3)+pow(x[2], 2)+pow(x[1], 1)= x[5] ;

output [ show(x[5])]

CROSSREFS

Cf. A316971.

Sequence in context: A235227 A039544 A091819 * A117244 A039436 A043259

Adjacent sequences:  A318155 A318156 A318157 * A318159 A318160 A318161

KEYWORD

nonn

AUTHOR

Pierandrea Formusa, Aug 19 2018

EXTENSIONS

More terms from Giovanni Resta, Aug 19 2018

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 20 03:42 EDT 2020. Contains 337264 sequences. (Running on oeis4.)