load 'plot' cu =. #/.~@:(#...@q:) NB. Count Unique
plot cu@:>:@:i."(0) 100,. 1000 ,. 1500 NB. each has a maximum mcu=. (>./)@:cu@:>:@:i."(0) NB. Max Count Unique xx =. >: i. 10000 plot f =. mcu >: xx NB. line with some wobbles NB. take out the 2nd polynomial c =. f %. xx ^/ i. 3 plot (f - c p. ]) xx NB. quite an intricate signal. 2009/8/6 Tracy Harms <[email protected]>: > 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 > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
