-2
$\begingroup$

How many 6digit numbers of the form XYZZYX (where Y is prime) are possible which are divisible by 7

A 42 B 56 C 70 D 84

$\endgroup$
1
  • 1
    $\begingroup$ Welcome to Puzzling, take our tour! Could you please provide proper attribution for this question? $\endgroup$
    – bobble
    Feb 4 at 15:13

1 Answer 1

2
$\begingroup$

$100001 x + 10010 y + 1100 z \equiv 0 \mod 7$

$6 x + z \equiv 0 \mod 7$

It is easy to go through the $x$ values from 1 to 9 and see if there are two (or just one) corresponding $z$ values. There are a total of 14 possible $(x, z)$ pairs, and $4$ possible prime $y$ values. So, the final answer is $14 \times 4 = 56$.

$\endgroup$
3
  • 3
    $\begingroup$ $6 x + z \equiv 0 \mod 7$ means $z \equiv x \mod 7$ $\endgroup$
    – Florian F
    Feb 4 at 16:28
  • $\begingroup$ @FlorianF $z \equiv -x$, surely? $\endgroup$ Feb 4 at 23:36
  • $\begingroup$ No. take 6x+y=0, add x on both sides (mod 7) and you get z=x. $\endgroup$
    – Florian F
    Feb 5 at 9:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.