musings

page for some miscellaneous musings

on cultures of collaborative internet maths research platforms

the OEIS

see also this nice exposition about its workings from a more idealistic perspective

i have been watching the OEIS from the inside for a long time

it is somewhat uniquely poised as a site which both welcomes contribution from anyone and, unlike Wikipedia or StackExchange, requires moderators to manually approve of edits.

they also are chronically understaffed, and a lot of the staff they do have are chronically pedantic.

many see each open draft as an opportunity to teach a lesson in didacticism to contributors, by flagging up the issue they see in a comment and awaiting the original submitter's revision to remediate it.

the problem with this is that being thinly stretched and unable to guarantee prompt responses, this adds hours (at best) to weeks (usually only days) of waiting time before one may start a new draft slot.

and when the issues are things like leaving one added formula unsigned, or one program not demarcated as being in Python when it clearly starts by importing sympy, the unwillingness to fix what pointed out (and the implication that you could learn by fixing it yourself, and that it's worth slowing down your contribution by hours to days to teach you this lesson) comes across as condescending.

many contributors who demonstrably contributed interesting things in high volume over multiple-year periods have since departed, and others have snapped and been banned. (i myself was subject to a year-long ban for editing in others' draft slots, and after coming back resolved to use the wiki as my primary outlet to prevent a reoccurrence)

however, it helps a lot to bear in mind that the senior editors aren't malicious, and to be endlessly patient.

as you can possibly tell from this website, i like lightly-formatted monospaced text a lot; i've seen the lack of LaTeX support levied as a criticism/area of possible improvement a few times, but am relatively ambivalent on that front. an optional LaTeX frontend would be nice, but its usefulness would be inhibited by the existing strict rules about notation intended to minimise ambiguity (ie. we'd still have to write \(|\mathrm{Stirling1}(n,k)|\) instead of \(n\brack k\)). (I personally solve this problem by spinning up a userspace page with extended notes upon a sequence whenever I have them, but have been told this is an unintended use case and i should expect to fight breaking changes.)

the main two areas for improvement i can see are not in the database's presentation to readers at all, but interaction between contributors; the draft review system and the place of correspondence

allowing contributors to categorise the drafts they open in one (or multiple) categories (like combinatorics, number theory, group theory, geometry, integer partitions, analysis of algorithms (rough examples)), and senior editors to filter by category of specialisation, would probably speed up the editorial process somewhat
the categorisation of each draft by the purpose of its contribution (rather than by the subject of the sequence) is important, since sequences can lie in multiple fields, and contributions often recontextualise them when they happen to be found elsewhere
i was not in the old seqfan mailing list before its rebirth, since i couldn't figure out how to get past a browser-invariant wall in its signup process, but the current solution (a Google Group) is not ideal; news (about coverage of the OEIS in media) and requests for references/programs/help are all mixed together in one big list

i would like to propose the creation of a forum, and phpBB seems the best software for that, but as a (mostly inactive) ConwayLife community member, the biggest problem with their phpBB forum is the search

it refuses to accept your query if it contains words that are too common, and (to my knowledge) doesn't allow searching for exact matches of phrases; this is particularly an issue when you want to search for a rule (if someone has written it with a slash like B3/S23, it will interpret those as two different words) or an apgcode (xq4_153 is likewise two words, and xq4 is too common)

(currently, if you discover a pattern and want to know if it's known, you can enter it into Catagolue and see whether it's present in a forum-scraping census like oscthread_stdin. This doesn't tell you where it was discovered or by whom, and almost certainly won't tell you even in which haul it was uploaded; the attribute pages are usually empty for some reason)

however, i don't think any analogous problems would carry over to the OEIS

on Mathematica/WolframScript

as someone who does a lot of the kind of maths that is amenable to computers, i have become familiar with a few CASs.

note that WolframScript is free for personal use, without requiring any proof of affiliation to an institution!

irrespective of my opinions on Stephen Wolfram or his antics, Mathematica is the most extensive one for most of the things i want to do

it also benefits from inertia with a vast ecosystem put together by community goodwill; i have gotten a great deal of use out of the RiscErgoSum library.

however, it seems some of its decisions are hostile to those wishing to depart.

a notorious example i've heard of is Mathematica's PDF exporting; this mathematica.se question should give you some sense of how bad it is, with the intention assumedly to incentivise not exporting them at all and instead requiring the recipient to also have Mathematica

notebooks published by Stephen Wolfram himself seem not to have any such issues, leading one to speculate that he has his own patched version. Irrespective, for the notebookiarily inclined, Jupyter resolves this.

i like its lispiness (see Hans Lundmark's notes for a brief overview) but dislike how anti-metaprogramming many fundamental pieces of it seem to be; see for instance this typical use case

In:= f=FullSimplify[D[y/(y-1)*((2-E^x)^(1-y)-1),{y,k}]/k!/.y->0]
In:= MatrixForm[Table[Series[f,{x,0,4}],{k,0,4}]]
Out//MatrixForm=
                0

                     2    3    4
                    x    x    x        5
                x + -- + -- + -- + O[x]
                    2    6    24

                 2      3      4
                x    2 x    5 x        5
                -- + ---- + ---- + O[x]
                2     3      8

                 3      4
                x    3 x        5
                -- + ---- + O[x]
                6     8

                 4
                x        5
                -- + O[x]
                24

In:= MatrixForm[Table[List@@Series[f,{x,0,4}][[3]]*Range[k,4]!,{k,0,4}]]
Part::partd: Part specification 0[[3]] is longer than depth of object.
Thread::tdlen: Objects of unequal length in {0, 3} {1, 1, 2, 6, 24} cannot be combined.
Out//MatrixForm= {0, 3} {1, 1, 2, 6, 24}
                 {1, 1, 1, 1}
                 {1, 4, 15}
                 {1, 9}
                 {1}

context: (with offset 0) had come up in an investigation, and i wanted to add the e.g.f. to save my future self and others time, but its OFFSET in the database is 1, so i worked it out for that case too; i deeply distrust myself, so verified it with MatrixForm[Table[FullSimplify[(D[y/(y-1)*((2-E^x)^(1-y)-1),{y,k}]/k!/.y->0)-(1-(2-E^x)*Sum[(-1)^i*Log[2-E^x]^i/i!,{i,0,k-1}])],{k,1,6}]] before contributing to the database

anyway, casting an empty Series to a List does not yield an empty list because the place where the list is meant to be is omitted.

this and many other problems like it make building anything beyond one-liners a more annoying and exceptionhandlingful experience than it ought to be!

it is also somewhat upsetting, principly, that its machinations are unknowable, and concerning that it's capable of being wrong. erroneous outputs are somewhat pervasive and can be encountered serendipitously; this question concerns one i found (a certain Laplace transform upon which Integrate returns a value 1 lower than the truth given by NIntegrate), which Daniel Lichtblau filed in the issue tracker, and this question one that persisted for the 7 years since its discovery

it seems guarantees of implementation correctness (via a proof language) would be at least as useful for a CAS as a compiler

on large language models

i am a programmer and a mathematician, but (currently) identify much more strongly with both of those things as an amateur than a student or professional or otherwise one with a monetary incentive to crank things out on a deadline or at scale

to this end, i consider myself a largely unbiased judge of LLMs

i had started interacting with ChatGPT in 2023, by giving it some one-liners in my typical idiosyncratic style and asking it to discern their purpose; to this end I was very thoroughly disappointed, since any sign of understanding it appeared to bear was quickly dispelled by rewriting them with the variable names ordered alphabetically by appearance and finding it display the same confidence in nonsense, or replacing i,j,x with n,k,j and watching it suddenly believe that my Faddeev-LeVerrier minpoly-finder was actually the binomial theorem

i did this because i had heard from some of my peers strong conviction in its intelligence and assumed that this, a test outside of what it had been hyperoptimised to appear intelligent upon, would be a good way of testing raw reasoning; upon getting my answer, i lost interest

then, in early 2025, a close friend on Discord (whose judgement i respect a lot more than that of the aforementioned peers) told me of their success at using DeepSeek-R1 on a few maths problems, and found that it was somewhat useful for their own research maths, which made me curious

however, the tipping point of my whole outlook upon them came when i was discussing a problem with my friend Cosmia Nebula. i wanted to find a formal Laurent series (termed by some a Poincaré expansion) for the error of the asymptotic \(\frac{n!}e(H_n-1)\) for , the total number of cycles in all derangements. This is easy to arrive upon!

by inclusion-exclusion, the number of \(n\)-derangements ((n)\(=!n\)) is \(\sum_{k=0}^n(-1)^{n-k}\binom nkk!\sim\frac{n!}e\), where the \(\sim\) is made exact by starting \(k\) at \(-\infty\); the truncated part of the infinite series has alternating signs; each term is smaller than the one before, so larger than the tail ahead, so the sign of the error is determined entirely by the first omitted term; it alternates between being an upper and lower bound!
Ramanujan's contribution was to show that \((-1)^n\left(!n-\frac{n!}e\right)\sim\sum_{k=1}^m\frac{(-1)^{k-1}\mathrm{Bell}_k}{n^k}\) (showing that the absolute error, though monotonically shrinking and by all sensible definitions well-behaved, is actually quite subtle! the right side diverges as \(m\) grows while \(n\) is fixed, but converges as \(n\) grows, with each \(m\) being \(\Theta(n)\) times better than \(m-1\); this is more striking to me than Stirling's approximation, because the consideration of an optimal number of terms to use is forced by the choice to use an ordinary power series as one's basis)
the number of cycles in an \(n\)-permutation is expected to be \(H_n\) with variance \(H_n-H^{(2)}_n\); the expectation is a consequence (by linearity of expectation) of the fact that there are an expected \(\frac1k\) \(k\)-cycles for \(k\le n\) (see this slideshow i hastily put together)
the unrigorous idea "maybe if we remove all the permutations with \(1\)-cycles, the expected number of \(k\)-cycles in our remaining permutations will remain about the same" so \(A162973(n)\sim\frac{n!}e(H_n-1)\).

being new to this area and self-taught (having approached it sideways, starting from being intrigued by Ramanujan's finding listed on A000110's page), I had some grasp of how the tools worked but little of how to apply them, and found myself hitting walls and frustration in attempted derivations repeatedly

i gave Cosmia a very thorough description of my problem, which she inputted verbatim into ChatGPT, which was able to find a similar formula on its own in reasoning mode, translating to \(A162973(n)\sim\frac{n!}e\left(H_n-1+\sum_{j=0}^\infty\frac{\int_{x=-1}^0\mathrm{Bell}_j(x)}{n^{j+1}}\right)\).

i later learned about Watson's lemma (and how its converse is an extremely useful incorrect theorem that very often holds or almost-holds), and did some more interesting things with it (that are besides the point for here) in

ChatGPT in particular is capable of being extremely useful at a surprisingly broad range of tasks; specifically, ones for which the possibility of hallucination is mitigated by default (since checking its correctness on them is inexpensive time/effortwise)

acting as a computer algebra system! for the kind of problem that i'd turn to WolframScript to do and see no fundamental reason for its ineptitude at, ChatGPT can often be the bridge
its answers' annotated explanations (that it writes by default for free) supersede all use i got out of WolframAlpha Pro (when i pirated it), which in retrospect feels extremely narrow and clunky in comparison (which i mention because it was a thing that Wolfram Inc. felt worth charging money for)
giving guidance on what direction the next step should take; this is inextricable from the previous, but by breaking problems apart into steps and feeding them in one-at a-time, it will approach things in ways that (while standard and routine to some authors that it learned from) may be unknown to you or be useful in ways you didn't consider!
this 'intuition' (as Cosmia put it to me) outweighs its propensity for arithmetic slip-ups considerably
searching the internet by intent rather than keywords; something that traditional search engines attempted to converge towards but plateaued
in particular, describing a technique in terms of an integral transform and asking what it's called in the new context you're applying it is something that would previously only have been possible via a Q&A site like math.se, with the problems then being latency and that the terms in which you formulated it are so specific that it bears little worth as part of a curated database of problems and solutions
searching the internet more rapidly than before
i have yet to find many examples, but the best one i do have was when i was working on a problem about Ramanujan's \(Q\) function and wanted to cite Cauchy's original paper mentioned in Knuth's analysis of optimum caching so i could find and link the exact page on which he proves the general form of the convolution formula; the page number Knuth gave is for its position not in the original publication of Exercices de Mathématiques, but in fact its rerelease as part of Cauchy's collected works, which caused me a lot of frustration with the original copy found on archive.org before it occurred to me to ask ChatGPT

it is useful in a variety of applications i wouldn't have dared guess possible before witnessing them, and there is a spark of something extremely interesting within it worth nurturing and investigating

i recognise that this view is quite reminiscent of the 'hype' from CEOs and investors (which many have come to loathe), but i (frugal as i am) have not spent any money on any LLM yet!

if i were appointed benevolent dictator for life of Earth, i would establish a working group to produce a high-quality corpus of maths training data at scale by hand (many hands)

my interest in generating functions and Stirling numbers has given me some insight as to where arithmetic slips originate; fragmented and ambiguous notation is a very big factor! the most common frustration i have is it forgets that a pair of square brackets are a coefficient extractor and pulls a factorial out of them instead of multiplying both the inside and the outside by the same amount, and it confuses the kinds of Stirling number for each other more than i think it would if Knuth's \brack and \brace were universally adopted for them

i understand that LLMs (and their counterpart of diffusion models that proliferated after a breakthrough at about the same time) are capable of evil (dilution of the internet as a repository of humanity's thought and media, as well as making SEO spam much more difficult to reliably detect automatically, including by untrained humans), but this should not tinge your views of its uses for good

see also the AlphaEvolve technical report/whitepaper and (more pertinently for those interested in its application) Mathematical exploration and discovery at scale

operating systems that lie to you and misappropriate names

macOS comes with the clang compiler preinstalled, with the alias gcc

this has most likely cost thousands of person-hours of productivity; i spent an embarrassingly long time trying to work out why OpenMP wasn't working for anything before learning of it

the origin of this debacle is that gcc updated to GPLv3, which would force macOS to be open-source, and so it switched to clang but didn't want to break existing programs which had gcc hardcoded by giving a clear error message

Ubuntu comes with the snap package manager/extensions store, with the alias apt

i strongly advise against both if you can help it