6 kyu

Something similar to RokuLiuYeoseot- Nacci

158 of 190raulbc777

Description:

We have the following recursive function:

The 15-th term; f(14) is the first term in having more that 100 digits.

In fact,

f(14) = 2596253046576879973769082409566059879570061514363339324718953988724415850732046186170181072783243503881471037546575506836249417271830960970629933033088

It has 151 digits.

Make the function something_acci(), that receives num_dig (number of digits of the value) as unique argument.

something_acci() will output a tuple/array with the ordinal number in the sequence for the least value in having equal or more than the given number of digits.

Let's see some cases:

something_acci(20) == (12, 25)
# f(11) = 1422313222839141753028416

something_acci(100) == (15, 151)
something_acci(20) == [12, 25]
# f(11) = 1422313222839141753028416

something_acci(100) == [15, 151]

The number of digits given will be always more than 5. num_dig > 5.

Happy coding!!!

And the name for this kata? You have three words of the same meaning in Asian Languages.

Fundamentals
Mathematics
Recursion

Stats:

CreatedDec 30, 2015
PublishedDec 30, 2015
Warriors Trained629
Total Skips75
Total Code Submissions590
Total Times Completed190
Python Completions158
Ruby Completions31
C# Completions16
Total Stars12
% of votes with a positive feedback rating89% of 69
Total "Very Satisfied" Votes57
Total "Somewhat Satisfied" Votes9
Total "Not Satisfied" Votes3
Total Rank Assessments9
Average Assessed Rank
6 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • raulbc777 Avatar
  • NaMe613 Avatar
  • Voile Avatar
  • bidouille Avatar
  • hobovsky Avatar
  • dfhwze Avatar
  • Just4FunCoder Avatar
  • saudiGuy Avatar
Ad