hermann on Mon, 01 Jan 2024 09:58:41 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

gp_oeis_search (Search integer sequence specified by short PARI/GP script on oeis.org)


Often I search for integer sequences on the on-line encyclopedia for integer sequences. I create a short script that prints the sequence I am interested, separated by commas. Then I copy that sequence into oeis.org search field to find the sequence.

Lately I always create the sequences with PARI/GP scripts, and they are typically short.
So I created script gp_oeis_search to automate this process:
https://gist.github.com/Hermann-SW/3112d25ede6052df738d8d96651f6d5d

Yesterday I was interested in the -4*n classnumber sequence and did:

$ gp_oeis_search 'for(i=1,40,print1(qfbclassno(-4*i),","))'

That opened this URL in the browser (works without commas being percent encoded in URL):

https://oeis.org/search?q=1,1,1,1,2,2,1,2,2,2,3,2,2,4,2,2,4,2,3,4,4,2,3,4,2,6,3,2,6,4,3,4,4,4,6,4,2,6,4,4,


I work with PARI/GP on my Android smartphone under termux.
And wanted to be able to use above script under termux as well.
After installing termux-x11 that was possible, details here (gist comment shows screenshot as well):

https://gist.github.com/Hermann-SW/3112d25ede6052df738d8d96651f6d5d?permalink_comment_id=4813538#gistcomment-4813538


Regards,

Hermann.