Skip to content

Instantly share code, notes, and snippets.

@whitej125
whitej125 / gist:c2174f5c5f2e9872e5667d34a572ad17
Created January 28, 2025 00:01
DeepSeek trying to solve 9-digit problem
>>> what 9 digit number is evenly divisible by 9, where the first 8 digits are evenly divisible by 8, the first 7 digits are evenly divisible by 7 and so on all the way down
<think>
Alright, let's tackle this problem step by step. I need to find a 9-digit number that meets specific divisibility criteria for its initial segments.
First, I'll denote the 9-digit number as **abcdefghi**, where each letter represents a digit.
1. **Divisibility by 9**: The entire number must be divisible by 9. A well-known rule for divisibility by 9 is that the sum of all digits should be divisible by 9.
2. **First 8 digits (abcd efgh)**: These need to form a number divisible by 8. For any number to be divisible by 8, its last three digits must be divisible by 8.