A321890 Primes of the form p^2 + 16 where p is prime.
41, 137, 857, 977, 1697, 6257, 7937, 11897, 22817, 32057, 36497, 44537, 52457, 78977, 96737, 151337, 160817, 177257, 192737, 249017, 326057, 361217, 434297, 477497, 491417, 516977, 546137, 564017, 591377, 674057, 737897, 776177, 885497, 942857, 982097, 1018097
Offset: 1
Examples
41 is prime and 41 = 5^2 + 16, where 5 is prime, therefore 41 is a term.
Programs
-
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 *)
-
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
Extensions
More terms from Amiram Eldar, Nov 21 2018
Comments