How about -
s =: [: p: _1 + 2 ^ i.
At 13:28 -0500 2009/08/17, Kip Murray wrote:
>Verb i. produces takes from the sequence of non-negative integers:
>
> i.20
>0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
> i.5
>0 1 2 3 4
> 5 {. i.20
>0 1 2 3 4
>
>Verb s generates takes from a mystery sequence (no peeking in Sloane, please)
>
> s 13
>2 3 7 19 53 131 311 719 1619 3671 8161 17863 38873
> s 5
>2 3 7 19 53
> 5 {. s 13
>2 3 7 19 53
>
>Your mission, should you decide to accept it, is to provide a
>definition for s .
> As always, these instructions will
>----------------------------------------------------------------------
>For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm