OFFSET
1,1
FORMULA
q^2=sp(n)+sp(n+1), sp(n)=n-th semiprime.
EXAMPLE
6 is ok because sp(6)=15, sp(7)=21, 15+21=36=6^2, sp(n)=A001358(n)=n-th semiprime.
MAPLE
isA001358 := proc(n) option remember ; if numtheory[bigomega](n) = 2 then true; else false ; fi ; end: isA118717 := proc(n) option remember ; local qn, qn1 ; qn := 4 ; while true do qn1 := qn+1 ; while not isA001358(qn1) do qn1 := qn1+1 ; od ; if qn+qn1 =n then RETURN(true) ; elif qn+qn1 > n then RETURN(false) ; fi; qn := qn1 ; od; end: isA109312 := proc(q) isA118717(q^2) ; end: for q from 1 to 500 do if isA109312(q) then printf("%d, ", q) ; fi ; od; # R. J. Mathar, Aug 15 2007
MATHEMATICA
Select[Sqrt[#]&/@(Total/@Partition[Select[Range[80000], PrimeOmega[#] == 2&], 2, 1]), IntegerQ] (* Harvey P. Dale, Dec 11 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Jun 27 2005
EXTENSIONS
More terms from R. J. Mathar, Aug 15 2007
STATUS
approved