Hello Roger,
I gfuess I'm still allergic to @ , so I tweeked your solution.
h=: 13 :',.(*:)^:(i.y)x'
9 h 4
9
81
6561
43046721
h
4 : ',.(*:)^:(i.y)x'
Linda
-----Original Message-----
From: Programming <[email protected]> On Behalf Of Roger
Hui
Sent: Monday, May 13, 2019 10:07 AM
To: [email protected]
Subject: Re: [Jprogramming] Seqfan problem
f=: ; @: (*:&.".&.>) @: ":
f 9
81
f f 9
641
f f f 9
36161
f^:(i.10) 9
|domain error
| f^:(i.10)9
This last runs afoul because of f^:0]9 which has a numeric result and can not
be mixed with the other f^:n]9. It can be fixed by preapplication of
": or by starting with '9', or by not doing f^:0 of course.
f^:(i.10) ": 9
9
81
641
36161
9361361
8193619361
641819361819361
36161641819361641819361
93613613616164181936136161641819361
8193619361936136136161641819361936136136161641819361
On Mon, May 13, 2019 at 2:48 AM R.E. Boss <[email protected]> wrote:
> Was wrong subject. My mailing is getting rusty too.
>
>
> R.E. Boss
>
>
> > -----Oorspronkelijk bericht-----
> > Van: Programming <[email protected]>
> > Namens R.E. Boss
> > Verzonden: maandag 13 mei 2019 11:07
> > Aan: [email protected]
> > Onderwerp: Re: [Jprogramming] JELM - Extreme Learning Machine in J
> >
> > It took me more time than expected to produce the sequence of
> > numbers in
> > J:
> >
> > (from Seqfan Mailing list -
> > https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flis
> > t.seqfan.eu%2F&data=02%7C01%7C%7C7c6d82c35c014cf4652d08d6d7ac4c8
> > 1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636933532345258051&am
> > p;sdata=GC2uFgol20SSGiuiQxovfutg7CiRoL2NrVbnrVwQMhA%3D&reserved=
> > 0)
> > > Beginning with a two-digit square, successively replace each digit
> > > with its square, then repeat.
> > >
> > > For example,
> > > 9
> > > 81
> > > 641
> > > 36161
> > > 9361361
> > > 8193619361
> > > 641819361819361
> > > 36161641819361641819361
> > > 93613613616164181936136161641819361
> >
> > ((]#.~ 10x^10>:@<.@^.]) *:@(10&#.^:_1))^:(i.10)9
> > 9 81 641 36161 9361361 8193619361 641819361819361
> > 36161641819361641819361 93613613616164181936136161641819361
> > 8193619361936136136161641819361936136136161641819361
> >
> > Curious about other, more elegant solutions, since my J is getting rusty.
> >
> >
> > R.E. Boss
> > --------------------------------------------------------------------
> > -- For information about J forums see
> > https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww
> > .jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C7c6d82c35c014cf465
> > 2d08d6d7ac4c81%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C63693353
> > 2345258051&sdata=nfGaDpROS2fYyOYbUhYQB2jN8lLiOOn1qDvT5AZpHEI%3D&
> > amp;reserved=0
> ----------------------------------------------------------------------
> For information about J forums see
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.j
> software.com%2Fforums.htm&data=02%7C01%7C%7C7c6d82c35c014cf4652d08
> d6d7ac4c81%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C63693353234526
> 8069&sdata=cBw2m%2FWRZyIW2bqltGpgFv2m8zEsp7mmVWVDxQ8b52A%3D&re
> served=0
>
----------------------------------------------------------------------
For information about J forums see
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7C%7C7c6d82c35c014cf4652d08d6d7ac4c81%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636933532345268069&sdata=cBw2m%2FWRZyIW2bqltGpgFv2m8zEsp7mmVWVDxQ8b52A%3D&reserved=0
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm