OFFSET
1,1
LINKS
Michael M. Ross, Instantly Factor a Semiprime of Any Size!
EXAMPLE
3*5=15,16-15=1; 3*7=21;25-21=4->2; 5*13=65,81-65=16->4;...
MATHEMATICA
f1[n_]:=Last/@FactorInteger[n]=={1, 1}; f2[n_]:=IntegerQ[Sqrt[Ceiling[Sqrt[n]]^2-n]]; lst={}; Do[If[f1[n]&&f2[n], AppendTo[lst, n]], {n, 3*7!}]; lst
spQ[n_]:=Module[{nps=Ceiling[Sqrt[n]]^2}, PrimeNu[n]==PrimeOmega[n] == 2 && IntegerQ[Sqrt[nps-n]]]; Select[Range[3200], spQ] (* Harvey P. Dale, Aug 17 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Joseph Stephan Orlovsky, Sep 15 2010
STATUS
approved