OFFSET
1,2
COMMENTS
EXAMPLE
semiprime(1) = 4, sqrt(4) = 2.000, first digit of fractional part is 0, so a(1) = 0.
semiprime(2) = 6, sqrt(6) = 2.449, 2nd digit of fractional part is 4, so a(2) = 4.
semiprime(3) = 9, sqrt(9) = 3.000, 3rd digit of fractional part is 0, so a(3) = 0.
semiprime(4) = 10, sqrt(10) = 3.162277, 4th digit of fractional part is 2, so a(4) = 2.
semiprime(5) = 14, sqrt(14) = 3.741657, 5th digit of fractional part is 5, so a(5) = 5.
semiprime(6) = 15, sqrt(15) = 3.8729833, 6th digit of fractional part is 3, so a(6) = 3 semiprime(7) = 21, sqrt(21) = 4.58257569, 7th digit of fractional part is 6, so a(6) = 6.
MATHEMATICA
SemiPrimePi[n_] := Sum[ PrimePi[n/Prime@i] - i + 1, {i, PrimePi@ Sqrt@n}]; SemiPrime[n_] := Block[{e = Floor[ Log[2, n] + 1], a, b}, a = 2^e; Do[b = 2^p; While[ SemiPrimePi@a < n, a = a + b]; a = a - b/2, {p, e, 0, -1}]; a + b/2]; f[n_] := Mod[ Floor@ N[10^n*Sqrt@ SemiPrime@n, n + 10], 10]; Array[f, 111] (* Robert G. Wilson v, Jul 31 2010 *)
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Jonathan Vos Post, Jun 22 2010
EXTENSIONS
a(16) onwards from Robert G. Wilson v, Jul 31 2010
STATUS
approved