A243904 Semiprimes of the form p^2 + pq + q^2, where p, q are consecutive primes.
49, 247, 679, 973, 2701, 5293, 7509, 10801, 12297, 15553, 17337, 25963, 29407, 33079, 34993, 36967, 43249, 53877, 67501, 71157, 76809, 97201, 117613, 155953, 181573, 225237, 270049, 292033, 297679, 314977, 350917, 380217, 477607, 492091, 514213, 632047, 648679
Offset: 1
Keywords
Examples
247 is in the sequence because 7^2 + 7*11 + 11^2 = 247 = 13*19, which is semiprime. 679 is in the sequence because 13^2 + 13*17 + 17^2 = 679 = 7*97, which is semiprime.
Links
- K. D. Bajpai, Table of n, a(n) for n = 1..10000
Programs
-
Maple
with(numtheory): A243904:= proc() local k, p, q; p:=ithprime(n); q:=ithprime(n+1); k:=p^2 + p*q + q^2; if bigomega(k)=2 then RETURN (k); fi; end: seq(A243904 (), n=1..200);
-
Mathematica
Select[Table[Prime[n]^2 + Prime[n] Prime[n + 1] + Prime[n + 1]^2, {n, 100}], PrimeOmega[#] == 2 &]
-
PARI
issemi(n)=bigomega(n)==2 list(lim)=my(v=List(),p=3,t); forprime(q=5,, t=p^2+p*q+q^2; if(t>lim, break); if(issemi(t), listput(v,t)); p=q); Vec(v) \\ Charles R Greathouse IV, Jul 05 2017
Comments