# [Jelly], 18 bytes J:g¥Ƭ’}ṪU×ḷb§¥ƬṪS% [Try it online!][TIO-lzokdrap] [Jelly]: https://github.com/DennisMitchell/jelly [TIO-lzokdrap]: https://tio.run/##y0rNyan8/9/LKv3Q0mNrHjXMrH24c1Xo4ekPd2xPOrQcJAbkB6v@P7xcXzPy///o6GhDHQUTHQXDWB1Do1gdruhocx1DHSMdYx0THVMdMx1zHQsdSx1DAx1LuAIgByqPKWQBFDKECEGMJcJkQwPsRkPMgYgYw0ViAQ "Jelly – Try It Online" A less naive computation of the digital roots comes out a bit longer by having to special-case 0. Inverted output: truthy (nonzero) if the checksum fails. ``` J 1-indices from the start : divided by g¥ their GCDs with ’} B - 1 Ƭ Ṫ repeated while unique, U reversed ×ḷ times each N. ƬṪ Loop while unique: b ¥ Convert each to base B § and sum each. S Sum % mod B. ``` A version which ties with an alternative to repeated division: # [Jelly], 18 bytes :gɓ’* JçU×ḷb§¥ƬṪS% [Try it online!][TIO-lzokw588] [Jelly]: https://github.com/DennisMitchell/jelly [TIO-lzokw588]: https://tio.run/##y0rNyan8/98q/eTkRw0ztbi8Di8PPTz94Y7tSYeWH1p6bM3DnauCVf8fXq6vGfn/f3R0tKGOgomOgmGsjqFRrA5XdLS5jqGOkY6xjomOqY6ZjrmOhY6ljqGBjiVcAZADlccUsgAKGUKEIMYSYbKhAXajIeZARIzhIrEA "Jelly – Try It Online" `ç` is used to save 1 byte compared to an excessive combination of quicks in `:g¥*@¥’}` or `:g¥’*¥@¥`: ``` : Divide the indices by g their GCDs with ɓ’ B - 1 * raised to the power of each index. ``` No prime factor of any index has a multiplicity greater than that index, so it suffices to exponentiate B - 1 that many times.