News for hackers. Stuff that matters.
Re:Any positive number can be written as a sum of three pali... by taejo on Wednesday September 19, 2018 @08:26AM (#18023655)
And much more generally, "numbers divisble by n written base b" is a regular language decidable by an n-state DFA (and thus in linear time, looking at each digit exactly once). And see https://blog.plover.com/math/divisibility-by-7.html for a state machine that's even simpler (you only need edges for +1 and ×b, rather than +d×b for each digit d)

There are no comments on this comment yet.