Challenge: Keith numbers Message #1 Posted by Don Shepherd on 5 Sept 2009, 9:48 p.m.
Number theory has all kinds of identifiers for mathematically unusual numbers. Take Keith numbers, for instance. I think it is easier to give an example of a Keith number than to explain mathematically what it is, so here goes.
Is 14 a Keith number? Yes. Why?
start a Fibonacci-like sequence with the individual digits of 14, and each subsequent number is the sum of the previous 2 (because 14 has 2 digits) numbers:
1,4,(1+4=)5, (4+5=)9, (5+9=)14. Since 14 is in the sequence that begins with 1,4, it is a Keith number.
Is 30 a Keith number? No. Why?
3,0, (3+0=)3, (0+3=)3, (3+3=)6, (3+6=)9, (6+9=)15, (9+15=)24, (15+24)=39. Since 30 is not in the sequence, it is not a Keith number.
What about 3 digit Keith numbers? Is 145 a Keith number?
1,4,5, (1+4+5=)10, (4+5+10=)19, (5+10+19=)34, (10+19+34=)63, (19+34+63=)116, (34+63+116=)213, so 145 is not a Keith number.
So, the challenge is to write a calculator program (RPN, RPL, BASIC, pick your favorite language and calculator) to identify as many Keith numbers as you can. You can verify your results by Googling Keith number. And post your code so we can all benefit from your brilliance!
I can't think of any practical reasons that Keith numbers are important, but there aren't that many of them and this problem does lend itself to solutions on the devices we have come to know and love.
|