A065376 Primes of the form p + k^2, p prime and k > 0.
3, 7, 11, 17, 19, 23, 29, 41, 43, 47, 53, 59, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 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
Offset: 1
Keywords
Examples
a(3) = 11 = 2 + 3^2 = 7 + 2^2.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..1000
Programs
-
Maple
N = 1000: # to get all entries <= N Primes:= select(isprime, {$1..N}): Primes intersect {seq(seq(p + k^2, p = Primes),k=1..floor(sqrt(N)))}; # Robert Israel, Sep 03 2014
-
Mathematica
q[n_] := AnyTrue[Range[Floor[Sqrt[n]]], PrimeQ[n - #^2] &]; seq[lim_] := Module[{p = Prime[Range[lim]]}, Select[p, q]]; seq[100] (* Amiram Eldar, Apr 12 2025 *)
-
PARI
lista(nn) = {forprime(p=2, nn, forprime(q=2, p-1, if (issquare(p-q), print1(p, ", "); break;);););} \\ Michel Marcus, Sep 03 2014
Comments