To solve the problem, we need to determine the smallest value of \( a + b \) such that the seven-digit number \( ab313ab \) is divisible by 12. A number is divisible by 12 if it is divisible by both 3 and 4.
### Step 1: Check divisibility by 3
For a number to be divisible by 3, the sum of its digits must be divisible by 3. The digits of our number \( ab313ab \) can be summed as follows:
\[
\text{Sum of digits} = a + b + 3 + 1 + 3 + a + b = 2a + 2b + 7
\]
This sum must be divisible by 3. Therefore, we can express this condition as:
\[
2a + 2b + 7 \equiv 0 \ (\text{mod} \ 3)
\]
This simplifies to:
\[
2(a + b) + 7 \equiv 0 \ (\text{mod} \ 3)
\]
### Step 2: Rearranging the equation
We can rearrange this to find:
\[
2(a + b) \equiv -7 \equiv 2 \ (\text{mod} \ 3)
\]
This implies:
\[
a + b \equiv 1 \ (\text{mod} \ 3)
\]
### Step 3: Check divisibility by 4
For a number to be divisible by 4, the last two digits must form a number that is divisible by 4. The last two digits of our number are \( ab \), which can be expressed as \( 10a + b \). Therefore, we need:
\[
10a + b \equiv 0 \ (\text{mod} \ 4)
\]
### Step 4: Finding values for \( a + b \)
Now, we will find values of \( a + b \) that satisfy both conditions.
1. From \( a + b \equiv 1 \ (\text{mod} \ 3) \), possible values for \( a + b \) can be 1, 4, 7, 10, etc.
2. We also need to check \( 10a + b \equiv 0 \ (\text{mod} \ 4) \).
Let's check the possible values of \( a + b \):
- **If \( a + b = 1 \)**:
- Possible pairs: (0, 1), (1, 0)
- Check \( 10a + b \):
- For (0, 1): \( 10(0) + 1 = 1 \) (not divisible by 4)
- For (1, 0): \( 10(1) + 0 = 10 \) (not divisible by 4)
- **If \( a + b = 4 \)**:
- Possible pairs: (0, 4), (1, 3), (2, 2), (3, 1), (4, 0)
- Check \( 10a + b \):
- For (0, 4): \( 10(0) + 4 = 4 \) (divisible by 4)
- For (1, 3): \( 10(1) + 3 = 13 \) (not divisible by 4)
- For (2, 2): \( 10(2) + 2 = 22 \) (not divisible by 4)
- For (3, 1): \( 10(3) + 1 = 31 \) (not divisible by 4)
- For (4, 0): \( 10(4) + 0 = 40 \) (divisible by 4)
- **If \( a + b = 7 \)**:
- Possible pairs: (3, 4), (4, 3), (5, 2), (2, 5), (1, 6), (6, 1), (0, 7), (7, 0)
- Check \( 10a + b \):
- For (3, 4): \( 10(3) + 4 = 34 \) (not divisible by 4)
- For (4, 3): \( 10(4) + 3 = 43 \) (not divisible by 4)
- For (5, 2): \( 10(5) + 2 = 52 \) (divisible by 4)
- For (2, 5): \( 10(2) + 5 = 25 \) (not divisible by 4)
- For (1, 6): \( 10(1) + 6 = 16 \) (divisible by 4)
- For (6, 1): \( 10(6) + 1 = 61 \) (not divisible by 4)
- For (0, 7): \( 10(0) + 7 = 7 \) (not divisible by 4)
- For (7, 0): \( 10(7) + 0 = 70 \) (not divisible by 4)
### Conclusion
The smallest value of \( a + b \) that satisfies both conditions is 4. The valid pairs are (0, 4) and (4, 0), which yield \( a + b = 4 \).
### Final Answer
The smallest value of \( a + b \) is \( \boxed{4} \).