A225533 Numbers expressible as p^2 + 2^q where p and q are primes.
8, 12, 13, 17, 29, 33, 36, 41, 53, 57, 81, 125, 129, 132, 137, 153, 173, 177, 201, 249, 293, 297, 321, 365, 369, 393, 417, 489, 533, 537, 561, 657, 845, 849, 873, 965, 969, 993, 1089, 1373, 1377, 1401, 1497, 1685, 1689, 1713, 1809, 1853, 1857, 1881, 1977, 2052
Offset: 1
Keywords
Examples
29 = 5^2 + 2^2, and both 5 and 2 are prime.
Links
- Christian N. K. Anderson, Table of n, a(n) for n = 1..10000
- Christian N. K. Anderson, Ulam Spiral of a(n) for n = 1..10000.
- Christian N. K. Anderson, Table of n, a(n), and all values of (p,q) producing a(n) for n = 1..10000.
Programs
-
Mathematica
nn = 15; ps = Prime[Range[nn]]; p2 = Prime[Range[PrimePi[2*Log[2, ps[[-1]]]]]]; t = Table[p^2 + 2^q, {p, ps}, {q, p2}]; Union[Select[Flatten[t], # < ps[[-1]]^2 &]] (* T. D. Noe, May 15 2013 *)
-
R
library(gmp); x=y=as.bigz(2); maxval=10000; sol=as.bigz(matrix(0,nc=3,nr=1000)); len=0 while(len<1000 & x^2+2^y
Comments