Largest multiple of $7$ lower than some $78$-digit number?

One can compute this number $a$ modulo $7$. The result is $2\bmod 7$. So take $a-2$. It is the largest multiple of $7$ less than $a$.


$$\begin{array}{cccccc}115792&089237&316195&423570&985008&687907\\852837&564279&074904&382605&163141&518161\\494336\end{array}$$ Sum up the places of these numbers, by place value carrying when needed, then apply $10^k\equiv 3^k \bmod 7$ you'll then have a much smaller number to find the remainder of that's equivalent. 5667972, which goes to :$$6(3^5)+6(3^4)+2(3^2)\equiv 1458+486+18\equiv 2+3+4\equiv 2 \bmod 7$$ so the largest multiple of 7, is 2 less than the number. Yes, this is a slightly tedious way to go, but it's inspired via extension of Fermat's little theorem, and polynomial remainder theorem.

The reason I broke it into 6 digits at a time, is because Fermat's extension, is that exponents that have the same remainder mod $p-1$, will give back the same remainder with the same base. That means you can simply turn one into the other, adding like terms. you then go and do the addition the first column on the right sums to 62, carry the 6, that means you sum the next column plus 6, giving 57 carry the 5, next column is then 59, carry the 5, next column 67, carry the 6, next column, 76 carry the 7, next column, 56 there's no column to carry the 5 onto, and in the next step, it will be merged with the 2 (6 digits before), and then tossed because 7 creates a term that is 0 mod 7. Doing the same to other 7's and the nine gives 660200 we then replace x=10 with 3, via polynomial remainder theorem, and evaluate the sum shown above.Formula used $$\sum_{n=0}^Ld_na^n\equiv\sum_{n=0}^L(d_n\bmod p)(a_n\bmod p)^{(n \bmod (p-1))} \pmod p$$ we did the exponent part first, the base part second, and the coefficient (digit) part third, we then used the simple reduction mod p last. For those wondering, That means in theory the first number that has a 12+ digit intermediate sum is ... 6 million and 6 digits if I did the math correct.

EDIT

Due to looking at previous questions, and a recent ultimate divisibility posting someone made, I've found a rule I forgot that makes it even less effort. But first a review of Columnar addition:

$$\begin{alignat}{}&115792\\&089237\\&316195\\&423570\\&985008\\&687907\\&852837\\&564279\\&074904\\&382605\\&163141\\&518161\\+\!\!\!&494336\\ &\overline{\phantom{123456}}\end{alignat}$$

These form the digit columns I refer to above. Now for the rule I forgot, which was: $$x\equiv y\implies x^c\equiv y^c$$ It's part of the Fermat extension used, but on its own, it's even more powerful!

All we did above, was a base $10^{\text{ord}(10,7)}$ digit sum, followed by a switch of base to base $(10\pmod 7)$ and a final modular reduction.

We can use the new rule without finding the order, and group digits into powers of previous group lengths allowing us to cut the additions used down ( using any exponent value):

$$\begin{alignat}{}115792089237316195423570985008&687907\\852837564279074904&382605\\163141&518161\\+\!\!\!&494336\\ &\overline{\phantom{123456}}\end{alignat}$$

this converges using a sum of the ceiling of log base $c$ of number of digits base $10^z$; where $z$ being the digit groupings (clumped a bit above). You'll note above I used $c=2,z=6$ this means I'll roughly half the number of digits at each addition chain . This does better than straight addition of the values if you have more than 10 digit groups, plus it's parallelizable.