151k views
4 votes
n the sequence $121, 1221, 12221, \dots ,$ the $n$th number consists of $n$ copies of the digit $2$, surrounded by two $1$s. How many of the first $100$ terms in the sequence are divisible by $3$?

User Mattumotu
by
5.5k points

2 Answers

4 votes

The
nth number in the sequence can be expressed as


a_n=10^(n+1)+\displaystyle2\sum_(i=2)^n10^i+21

Extracting the
nth term from the sum gives


a_n=10^(n+1)+2\cdot10^n+\displaystyle2\sum_(i=2)^(n-1)10^i+21

and
10^(n+1)+2\cdot10^n=10^n(10+2)=12\cdot10^n. 3 divides both 12 and 21, so
12\cdot10^n and 21 contribute no remainder.

This leaves us with


a_n\equiv10\cdot\underbrace{222\ldots222}_{n-2\text{ copies}}\pmod3

Recall that a decimal integer is divisible by 3 if its digits add to a multiple of 3. The digits in
10\cdot222\ldots222 are
n-2 copies of 2 and one 0, so the digital sum is
2(n-2)=2n-4.

  • If
    n=3k for
    k=0,1,2,3,\ldots, then the digital sum is
    2(3k)-4=6k-4, which is not divisible by 3.
  • If
    n=3k+1, then the sum is
    2(3k+1)-4=6k-2, which is not divisible by 3.
  • If
    n=3k+2, then the sum is
    2(3k+2)-4=6k, which is always divisble by 3.

This means that roughly 1/3 of the first
n numbers in this sequence are divisible by 3; among the first 100 terms, they occur for
n=2,5,8,\ldots,95,98, of which there are 33.

User Cody Covey
by
5.4k points
1 vote

Answer:

33

Explanation:

The number is divisible by 3 if the sum of digits is divisible by 3. 1221 is the first number with a sum of digits divisible by 3. Adding 3 more 2s to the sequence will result in another number divisible by 3.

So, every 3rd term from n=2 to n=98 will be divisible by 3, for a total of 33 terms out of the first 100 in the sequence.

User JochemKempe
by
5.0k points