A124598 Primes p of the form k^2+s where k > 1 and 1 <= s < (k+1)^2, such that q = k^4+s is prime and larger than p.
5, 7, 11, 17, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 79, 83, 89, 97, 101, 107, 109, 127, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 307, 311, 331, 337, 347
Offset: 1
Examples
5 = 2^2+1 is prime, 17 = 2^4+1 is a larger prime and 1 < 3^2, hence 5 is a term. 29 = 4^2+13 is prime, 269 = 4^4+13 is a larger prime and 13 < 5^2, hence 29 is a term. 805499 = 897^2+890 is prime, 647395643771 = 897^4+890 is a larger prime and 890 < 898^2, hence 805499 is a term. Prime number 19 has the form k^2+s with s < (k+1)^2 in two ways, as 3^2+10 and 4^2+3. Neither 3^4+10 = 91 nor 4^4+3 = 259 is prime, hence 19 is not in the sequence.
Links
- R. J. Cano, Table of n, a(n) for n = 1..10000
Programs
-
PARI
m=19;v=[];for(k=2,m,for(s=1,(k+1)^2-1,if((p=k^2+s)
p&&isprime(q),v=concat(v,p))));print(Set(v)) \\ -
PARI
upto(n)=my(res = List()); forprime(p = 5, n, for(k = ceil(sqrt(p / 2 + 1/4) - 0.5), sqrtint(p-1), if(isprime(k^4 + p - k^2), listput(res, p); next(2)))); res \\ David A. Corneth, Apr 08 2018
Extensions
Edited, corrected and extended by Klaus Brockhaus, Mar 05 2007
Comments