editing
approved
editing
approved
Harvey P. Dale, <a href="/A131866/b131866.txt">Table of n, a(n) for n = 1..1000</a>
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 *)
approved
editing
_Jonathan Vos Post (jvospost3(AT)gmail.com), _, Oct 04 2007
More terms from _R. J. Mathar (mathar(AT)strw.leidenuniv.nl), _, Oct 24 2007
a(1) = 0 because the 1st first semiprime is 4, which is a square.
easy,nonn,new
a(2) = 2 because the 2nd semiprime is 6, and |6-4| = 2 where 4 is the nearest square to 6.
a(4) = 1 because the 4th semiprime is 10, and |10-9| = 1 where 9 is the nearest square to 10.
easy,nonn,new
easy,nonn,new
Jonathan Vos Post (jvospost2jvospost3(AT)yahoogmail.com), Oct 04 2007
For each semiprime, find the closest square (preceding or succeeding); subtract, take absolute value.
Distance of n-th semiprime to nearest square.
0, 2, 0, 1, 2, 1, 4, 3, 0, 1, 3, 2, 1, 2, 3, 3, 0, 2, 6, 7, 6, 2, 1, 5, 7, 4, 1, 4, 5, 6, 9, 7, 6, 5, 6, 10, 6, 3, 2, 0, 1, 2, 8, 11, 10, 3, 2, 1, 1, 2, 11, 11, 10, 8, 3, 0, 8, 9, 13, 11, 9, 2, 5, 6, 7, 9, 10, 13, 12, 11, 10, 8, 7, 6, 4, 1, 10, 12, 9, 7, 3, 2, 3, 6, 9, 11, 15, 11, 2, 0, 2, 6, 9, 10, 12
1,2
a(1) = 0 because the 1st 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.
easy,nonn,new
Jonathan Vos Post (jvospost2(AT)yahoo.com), Oct 04 2007
More terms from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Oct 24 2007
approved