Knowing Hui likes &. I suggest 

   (4 :'i.&.(-&x)y')/@:>.&.:(-:@:<:@:(%&j)) m,n
55 65 75 85 95 105 115


R.E Boss


> -----Oorspronkelijk bericht-----
> Van: [email protected] [mailto:programming-
> [email protected]] Namens Zsbán Ambrus
> Verzonden: vrijdag 4 juni 2010 14:03
> Aan: Programming forum
> Onderwerp: Re: [Jprogramming] odd multiples
> 
> On Fri, Jun 4, 2010 at 7:31 AM, Roger Hui <[email protected]> wrote:
> > j, m, and n are positive integers with m<n.
> > Find a neat expression for all the odd multiples of j in [m,n),
> > that is, all k such that (m<:k)*.(k<n)*.(1=2|k%j) .
> 
>    'j m n'=: 5 50 120
>    range=: [+i.@:(0&>.)@:-~
>    range/@:>.&.:(-:@:<:@:(%&j)) m,n
> 55 65 75 85 95 105 115
> 
> As you require m<n, you could omit the ((0&>.)@:) part.
> 
> Ambrus
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to