%I #9 Sep 02 2015 11:24:04
%S 0,0,0,1,0,2,0,0,3,4,0,0,0,5,6,0,0,0,0,0,7,8,0,0,9,10,0,0,0,0,0,0,11,
%T 12,13,0,0,14,15,0,0,0,0,0,0,16,0,0,17,0,18,0,0,0,19,0,20,21,0,0,0,22,
%U 0,0,23,0,0,0,24,0,0,0,0,25,0,0,26,0,0,0,0,27,0,0,28,29,30,0,0,0,31,0,32,33
%N 0 unless n is the k-th semiprime when a(n) = k.
%C a(A001358(n)) = n; a(A100959(n)) = 0.
%H R. Zumkeller, <a href="/A174956/b174956.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = A064911(n)*A072000(n).
%t nn = 100; With[{tbl = Table[If[PrimeOmega[n] == 2, 1, 0], {n, nn}]},
%t Table[If[tbl[[i]] == 0, 0, Total[Take[tbl, i]]], {i, nn}]] (* _Harvey P. Dale_, Oct 13 2012 *)
%o (Haskell)
%o import Data.List (unfoldr)
%o a174956 n = a174956_list !! (fromInteger n - 1)
%o a174956_list = unfoldr x (1, 1, a001358_list) where
%o x (i, z, ps'@(p:ps)) | i == p = Just (z, (i + 1, z + 1, ps))
%o | i /= p = Just (0, (i + 1, z, ps'))
%o -- _Reinhard Zumkeller_, Oct 27 2012
%o (PARI) first(n)=my(v=List(),u=vector(n)); forprime(p=2,n\2, forprime(q=2,min(p,n\p), listput(v,p*q))); v=Set(v); for(i=1,#v, u[v[i]]=i); u \\ _Charles R Greathouse IV_, Sep 02 2015
%Y Cf. A049084.
%K nonn
%O 1,6
%A _Reinhard Zumkeller_, Apr 03 2010