Just for fun:
poly=: 0 9 1&p. :. ([: {:&>@{:"1 [: p. (9 1 ,"0 1~ -))
10{. ( (#~ (= |.&.(10&#.^:_1))"0) &. poly) >:i.12000
2 12 44 137 157 167 248 258 1639 1664
> From: Sherlock, Ric
>
> A few more using more @ as requested.
>
> 10 {. (#~ (-: |.)@":"0@(*: + 9&*)) >:i.12000
> 2 12 44 137 157 167 248 258 1639 1664
>
> 10 {. (#~ (-: |.)@":"0@<.@:(0 9 1&p.)) >:i.12000
> 2 12 44 137 157 167 248 258 1639 1664
>
> 10 {. ({~ [: I. (= |.&.(10&#.^:_1))"0@(* 9&+)) >:i.12000
> 2 12 44 137 157 167 248 258 1639 1664
>
> > From: Sherlock, Ric
> >
> > 10 {. (#~ [: (-: |.)@":"0 ] * +&9) >:i.12000
> > 2 12 44 137 157 167 248 258 1639 1664
> >
> > Or
> >
> > (10 {. ] #~ [: (-: |.)@":"0 ] * +&9) >:i.12000
> > 2 12 44 137 157 167 248 258 1639 1664
> >
> > > From: Ian Gorse
> > >
> > > For example:
> > > 258 is a value of n so that n(n+9) is a palindrome.
> > >
> > > I set out to find the first 10 numbers that meet this criteria and
> I
> > > came up with this..
> > >
> > > 10 {. n #~ ,( ( ] = [: ". [: |. ": ) ] * +&9 ) "0 ( n =. >:
> > i.12000
> > > )
> > > 2 12 44 137 157 167 248 258 1639 1664
> > >
> > > As you can see, I have already found my answers but this is just an
> > > educational request.
> > > I am just looking for some alternative solutions so I can read and
> > > digest the different ways it can be done. Ideally with the use of
> the
> > > @ conjuction as
> > > I have recently been understanding the conjuction @ a lot more, as
> I
> > > find the 'flow' of reading the J expression more fluent.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm