numberscope / frontscope

Numberscope's front end and user interface: responsible for specifying sequences and defining and displaying visualizers
MIT License
7 stars 15 forks source link

Add an algebraic interaction panel #94

Open gwhitney opened 2 years ago

gwhitney commented 2 years ago

It might be useful to add a screen to the Numberscope that allows one to enter algebraic expressions involving OEIS sequences and immediately execute them and see their values, like a mini-sage-type-notebook for the Numberscope. This should be possible by extending mathjs to understand OEIS sequence names, and add a notation like S(n^2, 0<n<17) for the first sixteen squares or S(n^2, 0<n) for a "lazy" object that encodes the entire infinite sequence. Or another example is http://mathnotepad.org, provided by the creator of mathjs, but with OEIS sequence access built in.

Although mathnotepad itself is not open source unfortunately, it should be possible to create something very similar with very little work by combining mathjs with an open-source notebook library, e.g., https://github.com/gzuidhof/starboard-notebook

This panel could either be "just another" visualizer which fills its panel with the notebook, or it could be a separate sort of panel. The argument for the "just another visualizer" option is that it would naturally then have access to the "palette" of sequences that the user has defined in the left panel, and presumably the user could then refer to them by some obvious names (even if they are just "s1", "s2", etc.)

gwhitney commented 1 month ago

I think this is mostly out of scope for frontscope, but that Differences and PrimeFactors together with the Formula sequence will actually cover most of this functionality once sequence operations (#416) and uniform handling of sequence bounds (#411) are implemented. Leaving this open until that happens, then we can re-evaluate.