Trying to define a way to generate the terms of a sequence, and starting with the number 5, I found, surprisingly, that the way I used generated this sequence:
5, 8, 11, 5, 8, 11, 5, 8, 11, ...
And these 3 numbers repeat in this order indefinitely.
Define a simple way to generate this sequence.
- Subtract 1
- Switch the digits (drop leading zeroes)
- Add 4
5 ... - 1 = 4 => 4 ... + 4 = ...
8 ... - 1 = 7 => 7 ... + 4 = ...
11 ... - 1 = 10 => 1 ... + 4 = ...
5 ... - 1 = 4 => 4 ... + 4 = ...
8 ... - 1 = 7 => 7 ... + 4 = ...
11 ... - 1 = 10 => 1 ... + 4 = ...
5 ...
|
Posted by Dej Mar
on 2009-03-10 10:44:37 |