SEQUENCE NUMBERS THAT PRODUCE FIBONACCI
LIKE SEQUENCES: Part 2
There was one issue with producing sequence
numbers for Fibonacci like sequences that I did not get into in the last lesson. That issue is what to do if you if you have
to subtract a previous term, or subtract some number times a previous term.
The procedure is pretty much the same as
before, except that you add the multiple that you are subtracting. This may be more clear if I give you an
example.
Suppose you wanted to create a sequence
number for a 2, 3, -1, -2, -3 Pentanacci sequence written with six digit
strings:
Pentanacci sequences need a total of 5
terms.
The first term will be 999999 -2, or 999997.
The second term will be 999999 – 2, or
999996.
The third term will be 999999 + 1, or
1000000.
The fourth term will be 999999 + 2, or
1000001.
The fifth and last term will be 999999 + 3
+1 or 1000003.
The next step, putting the terms together,
gives a detail we have to address. No
three of our 5 parts are 7 digits long instead of 6 digits long. Our extra digit will have to be “carried” and
added to the next part. In this case all three of our extra (or seventh) digits
is a 1.
The last (or fifth) part is 1000003.
When add the fourth part to the fifth part we
get 1000002000003.
Then when we add the third part we get
1000001000002000003.
Now add the second part and we get 999997000001000002000003.
Finally we add the first part and we get
999,997,999,997,000,001,000,002,000,003 which should give us the appropriate
digital expansion. Since this sequence
is listed in the OEIS I will need to either manually create the sequence, or
set up a spreadsheet to produce the needed terms so that we can compare the
results from the sequence number to a list of terms that we know are correct.
This is a list of the first 18 terms (the
first 14 non-zero terms), which includes all terms up to and including 6 digit
terms:
0
|
0
|
0
|
0
|
1
|
2
|
7
|
19
|
55
|
153
|
432
|
1,209
|
3,394
|
9,512
|
26,674
|
74,776
|
209,647
|
587,742
|
Now let’s check it out and see if it
performs as advertised.
The 2, 3, -1, -2, -3 Pentanacci Sequence:
999,997,999,997,000,001,000,002,000,003
1/999997999997000001000002000003 =
0.
000000 000000 000000 000000 000001 000002 000007 000019 000055 000153 000432 001209 003394 009512 026674 074776 209647 587743 …
Please notice that the terms are written
in six digit strings like we wanted them.
Notice also that all of the terms are accurate up to the 13th
non-zero term, but the 14th term is off by 1. That is because the 15th term is
a seven digit number, so the 7th digit “carries over” and adds to
the 15th term. We have seen
that before so it is not unexpected.
If we wanted to see if we could push this
to 12 digit strings and have accuracy up to and including 12 digit terms –
well, I’ll let you try it – OPPS, SORRY, I forgot I am a mathematician, a
retired teacher, and retired professor – “this will be left as an exercise
for the reader”.
|
Now I want to push on and show you the surprise
ending I promised. (All the best books
have a surprise ending don’t they?)
Let’s look at the 2, -1 Fibonacci Sequence. We can make this one so that it has terms
listed in three digit strings.
We will need two parts: 999 and 999.
The first part will be 999 – 2, which is 997.
The second part will be 999 +1 +1 (since it
is the last part), which is 1001.
When we put these two parts together we
will have to “carry over” the fourth digit in the second part (a 1). With this in mind when we put them together
we get: 998,001.
998,001 is a sequence number we have seen
before. It was the first one I
introduced to you. It produced a
counting sequence that counted from 000 to 997 accurately.
I was surprised to find out that counting
was really a special version of the Fibonacci Sequence (or that this special
version of the Fibonacci Sequence was really just a counting sequence).
SURPRISE!
David
No comments:
Post a Comment