and are somewhat special numbers. How?
Number of digits in is . Trying to make a n-onacci sequence with Thus, 14 lies in 2-onacci sequence started from its digits.
197: Number of digits in is . Repeating the above steps with , Thus, 197 lies in 3-onacci sequence started from its digits.
Such special numbers are called Keith Numbers , with being the smallest number that satisfy such property.
Calculate the sum of the 20th and 40th Keith Numbers.
Details and Assumptions :
is a name given by me only.
is an example of 2-onacci sequence starting with .
is an example of 3-onacci sequence starting with .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Main code is in the function k which similar to fibonacci, adds the previous terms of series based on length of given number and returns true if number in series, breaks if last number greater than given number.