OFFSET
1,2
COMMENTS
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(1) = 0 because the first semiprime is 4, which is a square.
a(2) = 2 because the 2nd semiprime is 6 and |6-4| = 2 where 4 is the nearest square to 6.
a(3) = 0 because the 3rd semiprime is 9, which is a square.
a(4) = 1 because the 4th semiprime is 10 and |10-9| = 1 where 9 is the nearest square to 10.
MATHEMATICA
dns[n_]:=Min[n-Floor[Sqrt[n]]^2, Ceiling[Sqrt[n]]^2-n]; dns/@Select[ Range[ 400], PrimeOmega[#]==2&] (* Harvey P. Dale, Aug 12 2016 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Oct 04 2007
EXTENSIONS
More terms from R. J. Mathar, Oct 24 2007
STATUS
approved