SOLUTION: What is the sequence formula for 20, 4, 8, 16,13

Algebra ->  Sequences-and-series -> SOLUTION: What is the sequence formula for 20, 4, 8, 16,13      Log On


   



Question 838228: What is the sequence formula for 20, 4, 8, 16,13
Answer by Edwin McCravy(20056) About Me  (Show Source):
You can put this solution on YOUR website!
To get the next term, there are two cases:

Case 1:  If a term has just 1 digit other than 0, the next term is
twice that non-zero digit.
Case 2:  If a term has no 0 digits, the next digit is the sum of the
product and the sum of the digits. 

[This defines all terms. All terms will be 1 or 2 digit numbers.  For
even if a term were 99, case 2 would make the next term also 99.]

We start with 26.  26 is the 1st term.

26 is case 2.  The product of the digits is 
2×6 or 12. The sum of the digits is 2+6 or 8.  So the 2nd term is 12+8 or 20.

20 is case 1.  Twice its non-zero digit is 4.  So the 3rd term is 4.

4 is case 1.  Twice 4 is 8.  So the 4rd term is 8.

8 is case 1.  Twice 8 is 16.  So the 5th term is 16.

16 is case 2.  The product of the digits is 1×6 or 6. The sum of the digits 
is 1+6 or 7. So the 6th term is 6+7 or 13.

13 is case 2.  The product of the digits is 1×3 or 3. The sum of the digits 
is 1+3 or 4. So the 7th term is 3+4 or 7.

7 is case 1.  Twice 7 is 14.  So the 8th term is 14.

14 is case 2.  The product of the digits is 1×4 or 4. The sum of the digits 
is 1+4 or 5.  So the 9th term is 4+5 or 9.

9 is case 1.  Twice 9 is 18.  So the 10th term is 18.

18 is case 2.  The product of the digits is 1×8 or 8. The sum of the digits 
is 1+8 or 9. So the 11th term is 8+9 or 17.

17 is case 2.  The product of the digits is 1×7 or 7. The sum of the digits 
is 1+7 or 8.  So the 12th term is 7+8 or 15.

15 is case 2.  The product of the digits is 1×5 or 5. The sum of the digits 
is 1+5 or 6.  So the 13th term is 5+6 or 11.

11 is case 2.  The product of the digits is 1×1 or 1. The sum of the digits 
is 1+1 or 2.  So the 14th term is 1+2 or 3.

3 is case 1.  Twice 3 is 6.  So the 15th term is 6.

6 is case 1.  Twice 6 is 12.  So the 16th term is 12.

12 is case 2.  The product of the digits is 1×2 or 2. The sum of the digits 
is 1+2 or 3.  So the 17th term is 2+3 or 5.

5 is case 1.  Twice 5 is 10.  So the 18th term is 10.

10 is case 1.  Twice its non-zero digit is 2.  So the 19th term is 2.

2 is case 1.  Twice 2 is 4.  So the 20th term is 4.

Notice that 4 was also the 3rd term.  Therefore the sequence will
repeat the 3rd through 19th terms infinitely:

26, 20, 4, 8, 16, 13, 7, 14, 9, 18, 17, 15, 11, 3, 6, 12, 5, 10, 2,
        4, 8, 16, 13, 7, 14, 9, 18, 17, 15, 11, 3, 6, 12, 5, 10, 2,
        4, 8, 16, 13, 7, 14, 9, 18, 17, 15, 11, 3, 6, 12, 5, 10, 2,...

That defines all the terms.

------------------

There is no easy general term for a sequence 
when each term of the sequence depends on the 
size and the base 10 digits of the preceding
term as well as whether the preceding term
ended in 0.  Here is the best thing you can do:

Define only the first 19 terms by writing them out
according to the above rules about digits and size.

a(1)=26, a(2)=20, a(3)=4, a(4)=8, a(5)=16, 
a(6)=13, a(7)=7, a(8)=14, a(9)=9, a(10)=18,
a(11)=17, a(12)=15, a(13)=11, a(14)=3, 
a(15)=6, a(16)=12, a(17)=5, a(18)=10,
a(19)=2

Then for the nth term, give these two formulas 
when n > 19
  
a(n) = a(r) where r = the remainder when 
n is divided by 17 and r > 2

a(n) = a(r+17) where r = the remainder 
when n is divided by 17 and r < 3  

-------------------------------------

For instance, 
if you want to find a(932),

           54
Divide 17)932
          85
           82
           68
           14

The remainder is r=14, so r > 2, and 
so a(932) = a(14) = 3 

if you want to find a(306), 

           18
Divide 17)306
          17
          136
          136
            0

The remainder r=0, so r < 2, and
so a(r+17) = a(0+17)=a(17)=5 
 
From that you can always get the nth term.
There is no easier formula for a(n), as this
is an extremely complicated sequence.

Edwin