Re: [Jprogramming] Power Conjunction

2022-03-06 Thread 'Michael Day' via Programming
Late to the power party! This is one way to automate the OEIS look-up - I'm not an expert on parsing the result,  but hunting for 'A', a single digit seems a good starter:    OEIS =: 'http://oeis.org/search?q='  NB. fails with https://... !    getoeisseries =:{{ {{(-.{.) ' ',,/ y&{{~.x{~(i.7)

Re: [Jprogramming] Power Conjunction

2022-03-06 Thread 'Michael Day' via Programming
I don't yet see how to separate the series itself/themselves from cross-refs! M On 06/03/2022 12:18, 'Michael Day' via Programming wrote: Late to the power party! This is one way to automate the OEIS look-up - I'm not an expert on parsing the result,  but hunting for 'A', a single digit seems

Re: [Jprogramming] Power Conjunction

2022-03-06 Thread Raul Miller
Here's a version of getoeisseries which only returns direct hits and not cross references: NB. install 'web/gethttp' require'regex web/gethttp' OEIS =: 'http://oeis.org/search?q=' NB. fails with https://... ! getoeisseries=: {{ a0=. I.''E.RAW A=. ,{."1'href="/A\d{6}"'rxmatches RAW a=. RAW

Re: [Jprogramming] Power Conjunction

2022-03-06 Thread 'Michael Day' via Programming
OK - Ian wondered about automating a search in OEIS. With a little inspection of the "page source" I've come up with this script;  it seems to work! Although lots of OEIS lists are potentially mentioned if a series is matched,  many are cross-references rather than the lower number of series

Re: [Jprogramming] Power Conjunction

2022-03-06 Thread 'Michael Day' via Programming
I forgot about regular expressions in J, but not familiar with them anyway! Used to know them in unix, once upon a time. Yr commas much better,  too. M On 06/03/2022 17:02, Raul Miller wrote: Here's a version of getoeisseries which only returns direct hits and not cross references: NB. install

Re: [Jprogramming] Power Conjunction

2022-03-06 Thread 'Michael Day' via Programming
Oops - please use this line in goeis,  just below,    echo ' results found',~ ": +/ok in place of    echo '3 results found' Mike On 06/03/2022 17:05, 'Michael Day' via Programming wrote: OK - Ian wondered about automating a search in OEIS. With a little inspection of the "page source" I've come

Re: [Jprogramming] Power Conjunction

2022-03-06 Thread Raul Miller
I frequently rely on two documentation mechanisms when I want to use regular expressions in J: (*) open 'regex' -- this lets me read the comments while looking at the definitions. The exported names begin with rx, and rxmatches is one of the mechanisms I reach for most often. J's open verb might