How it works
DµL‘:3x2jSạ¥¥LRṁ@ḅ1E Main link. Argument: n
D Decimal; convert n to base 10, yielding a digits array A.
µ Begin a new chain with argument A.
L Compute the length of A.
‘ Increment; add 1 to the length.
:3 Divide the result by 3.
This yields the lengths of the outer chunks.
x2 Repeat the result twice, creating an array C.
L Compute l, the length of A.
¥ Combine the two links to the left into a dyadic chain.
This chain will be called with arguments C and l.
¥ Combine the two links to the left into a dyadic chain.
S Take the sum of C.
ạ Compute the absolute difference of the sum and l.
j Join C, using the result to the right as separator.
We now have an array of the lengths of all three chunks the
digits of n have to be split in.
R Range; map each chunk length k to [1, ..., k].
ṁ@ Mold swapped; takes the elements of A and give them the shape
of the array to the right, splitting A into chunks of the
computed lengths.
ḅ1 Convert each chunk from unary to integer, computing the sum
of its elements.
E Test if the resulting sums are all equal.