Do you know Leon? If you do it’s probably not as Leon, but rather as having another name - in the same way you might know who Cherilyn Sarkisian is. Leon is known for having written a book about a numerical system and some number code sequences that model patterns found in nature. There are somewhat different descriptions of Leon's father; he was either a wealthy merchant or a simple shipping clerk. In any case, Leon grew up with a nickname that essentially meant son of a simpleton.
I must confess to being clueless about him until I encountered a related subject while solving a geocache puzzle. I now think he's a fascinating historical figure and that's why I based this puzzle on the code that is named for him.
The program that follows has been designed to generate some of Leon's code and also a sequence of digits that defines the location of the cache. I'd be fibbing if I claimed that having programming skills provides no advantage to solving this puzzle but I think searching the internet may just provide a faster solution.
enum { max_num_len = 16, max_lines = 50 } ;
struct line { char number_str[max_num_len] ; } ;
line lines[max_lines] ;
int leon(int n) ; char print_digit(int row, int column) ;
int main(int argc, char *argv[])
{
for (int j = 0 ; j < max_lines ; j++ )
{
sprintf(lines[j].number_str, "%d", leon(j)) ;
lines[j].number_str[strlen(lines[j].number_str)] = '\0' ;
}
printf("N%c%c %c%c.%c%c%c W%c%c%c %c%c.%c%c%c\n",
print_digit(14, 0),
print_digit(14, 1),
print_digit(30, 2),
print_digit(15, 0),
print_digit(24, 1),
print_digit(34, 2),
print_digit(39, 0),
print_digit( 8, 1),
print_digit(30, 2),
print_digit(13, 0),
print_digit(21, 1),
print_digit(14, 2),
print_digit(44, 1),
print_digit(16, 1),
print_digit(30, 2) ) ;
}
int leon(int n)
{
int first = 0 ; int second = 1 ; int next ;
while (n--)
{
next = first + second ;
first = second ;
second = next ;
}
return ( first ) ;
}
char print_digit(int row, int column)
{
if ( ( row < max_lines ) && ( column < max_num_len ) ) {
return ( lines[row].number_str[column] ) ;
}
else {
return ( ' ' ) ;
}
}