"cyclic artithmetic" is synonym for "modular arithmetic" (arithmetic over Z/nZ fields, where n is a finite integer and the division is inversible, unlike arithmetic on Z, Q, R or C with infinite bounds).
38 seconds on a Mac Pro is still lot of processing, and I'm sure you can get a reply in a few milliseconds if you use the proper representation of the problem: you'll end up decomposing integers into products of primes, and this can dramatically reduce the number of tests to perform (on this problem with 1027 data input, using basic brute force approache you end up testing about 1 million possibilities and using lot of memory or two embedded loops exploring the 1027*1027 possibilities to get a definite response). This problem is very similar to breaking RSA with a 10-bit public product key and looking for one of the two primes whose product gives the 10 bit public key (note that RSA does not really uses primes because they are too large to be tested, instead it uses two "most probably" primes using a primarily test which is quite time intensive).
This problem exposes a part of the RSA difficulty (for breaking public keys), based on the difficulty of decomposing very large integers into a product of two integers. But within this problem the problem is more limited because the product is still limited to 1027^2, so a brute force attack still works (even if it's not efficient and can be made dramatically faster by caching the decompositions in order to reduce the number of tests to perform).
I've not programmed the way to do that, but some people may find an efficient implemenhtation and new ideas to make this small problem much faster, without requiring much memory (note that sorting in this problem is not dramatically complex because you only sort rather small lists of about one thousands item and we know we can do that quite efficiently in O(n log n) time where n is about 1000, i.e. roughtly 10-bits only products; but for actual modern use of RSA, working on 1024-bit products, this is not possible in reasonnable time and with enough memory resources : this would not even be possible if we could use use all existing computers on Earth, because these huge numbers are many orders of magnitude above the total number of atoms in our observable universe and could run them all at 10 Gigahertz.
This makes this problem very interesting in fact to explore in order to find how we can optimie its resolution to get dramatically faster responses (with less loops and modest memory usage to store and cache the intermediate results).
The day 2 also explores such known computationally costly algorithms (here it is a well known problem of regular expressions and the difficulty to locate arbitrary long subtrings in a very large string (could be a entire database), without having to reparse the whole with brute force exploring M*N possibilities where M and N and the length of the substring and the longer string to scan: as these problems will have their computation difficulty growing each time, you won't be able to use basic tools like Excel to sum a list, you'll need to program and think really about the algorithms you use and the best data representation.
These problems are wellknown classes of algorithms where there's intensive research, and most of them are based on arithmetic (and you need to know many theorems on them): arithmetics on integers (or rationals) is one of the most complex part of mathematics and whose results interest a lot the whole computing industry, becaues these problems could reveal exploits that could be harvested to break security or privacy, and can now have very large impact on public freedoms and politics when all our economy now depends so much on computers and automated decisions.