Having gotten the answer you were looking for,

   #...@q: 1+i.10
0 1 1 2 1 2 1 3 2 2

I find myself interested in how many of each of the distinct results
occur in that range.
Here's a way to calculate that:

   #/.~ #...@q: 1+i.10
1 4 4 1

That is, for the first ten positive integers there's one with zero
prime factors, four primes, four with two factors, and one with three
factors.

   #/.~ #...@q: 1+i.100
1 25 34 22 12 4 2
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to