OFFSET
1,6
LINKS
R. Zumkeller, Table of n, a(n) for n = 1..10000
MATHEMATICA
nn = 100; With[{tbl = Table[If[PrimeOmega[n] == 2, 1, 0], {n, nn}]},
Table[If[tbl[[i]] == 0, 0, Total[Take[tbl, i]]], {i, nn}]] (* Harvey P. Dale, Oct 13 2012 *)
PROG
(Haskell)
import Data.List (unfoldr)
a174956 n = a174956_list !! (fromInteger n - 1)
a174956_list = unfoldr x (1, 1, a001358_list) where
x (i, z, ps'@(p:ps)) | i == p = Just (z, (i + 1, z + 1, ps))
| i /= p = Just (0, (i + 1, z, ps'))
-- Reinhard Zumkeller, Oct 27 2012
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Apr 03 2010
STATUS
approved