5 kyu
Numbers that are a power of their sum of digits
461 of 2,136raulbc777
Description:
The number 81 has a special property, a certain power of the sum of its digits is equal to 81 (nine squared). Eighty one (81), is the first number in having this property (not considering numbers of one digit). The next one, is 512. Let's see both cases with the details
8 + 1 = 9 and 92 = 81
512 = 5 + 1 + 2 = 8 and 83 = 512
We need to make a function that receives a number as argument n
and returns the n-th term
of this sequence of numbers.
Examples (input --> output)
1 --> 81
2 --> 512
Happy coding!
Algorithms
Mathematics
Sorting
Data Structures
Fundamentals
Similar Kata:
Stats:
Created | Sep 13, 2015 |
Published | Sep 13, 2015 |
Warriors Trained | 13741 |
Total Skips | 2682 |
Total Code Submissions | 32350 |
Total Times Completed | 2136 |
Python Completions | 965 |
Ruby Completions | 91 |
JavaScript Completions | 461 |
CoffeeScript Completions | 10 |
Java Completions | 299 |
C# Completions | 211 |
Clojure Completions | 19 |
Haskell Completions | 50 |
COBOL Completions | 5 |
Rust Completions | 29 |
D Completions | 5 |
Go Completions | 15 |
C++ Completions | 78 |
C Completions | 51 |
Total Stars | 459 |
% of votes with a positive feedback rating | 76% of 381 |
Total "Very Satisfied" Votes | 247 |
Total "Somewhat Satisfied" Votes | 84 |
Total "Not Satisfied" Votes | 50 |
Total Rank Assessments | 9 |
Average Assessed Rank | 5 kyu |
Highest Assessed Rank | 4 kyu |
Lowest Assessed Rank | 6 kyu |