OFFSET
1,1
COMMENTS
Also primes of the form p^2 + q^4 where p and q are primes. The proof of the equivalence of the set of primes p^2 + q^4, where p and q are primes, with respect to this sequence, is the following: Exactly 1 of (p, q) giving a term is 2. q^4 + 4 is divisible by 5 and/or composite and gives no terms. - David A. Corneth, Nov 21 2018
EXAMPLE
41 is prime and 41 = 5^2 + 16, where 5 is prime, therefore 41 is a term.
MAPLE
select(isprime, [ithprime(p)^2+16$p=1..180]); # Muniru A Asiru, Nov 24 2018
MATHEMATICA
Select[Prime[Range[100]]^2+16, PrimeQ] (* Amiram Eldar, Nov 21 2018 *)
PROG
(MiniZinc)
include "globals.mzn";
int: n = 1;
int: max_val = 1200000;
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 /\
pow(x[1], 2)+16= x[2] ;
output [ show(x)]
(PARI) upto(n) = my(res = List()); forprime(p = 3, sqrtint(n-16), if(isprime(p^2 + 16), listput(res, p^2 + 16))); res \\ David A. Corneth, Nov 21 2018
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Pierandrea Formusa, Nov 20 2018
EXTENSIONS
More terms from Amiram Eldar, Nov 21 2018
STATUS
approved