f=: +/@(_1 _3 _5&{) 
   (,f)^:(i.4) _3 _1 4 8 15
_3 _1 4 8 15  0  0  0
_3 _1 4 8 15 16  0  0
_3 _1 4 8 15 16 23  0
_3 _1 4 8 15 16 23 42



----- Original Message -----
From: Martin Pelletier <[EMAIL PROTECTED]>
Date: Wednesday, May 16, 2007 4:15 pm
Subject: Re: [Jprogramming] the most impressive & beautiful J phrase

> Seeing that page made me think, has anyone ever tried finding a 
> verb 
> that would produce the infamous sequence of numbers from Lost?
> 
> For reference: 4 8 15 16 23 42
> 
> Martin
> 
> Roger Hui wrote:
> > 
> http://www.jsoftware.com/jwiki/Essays/Fibonacci_Sequence#generating_functions>
>     (%-.-*:)t.   
> > computes the n-th Fibonacci number. e.g.
> >    (%-.-*:)t. 200x
> > 280571172992510140037611932413038677189525
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to