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

Stats:

CreatedSep 13, 2015
PublishedSep 13, 2015
Warriors Trained13741
Total Skips2682
Total Code Submissions32350
Total Times Completed2136
Python Completions965
Ruby Completions91
JavaScript Completions461
CoffeeScript Completions10
Java Completions299
C# Completions211
Clojure Completions19
Haskell Completions50
COBOL Completions5
Rust Completions29
D Completions5
Go Completions15
C++ Completions78
C Completions51
Total Stars459
% of votes with a positive feedback rating76% of 381
Total "Very Satisfied" Votes247
Total "Somewhat Satisfied" Votes84
Total "Not Satisfied" Votes50
Total Rank Assessments9
Average Assessed Rank
5 kyu
Highest Assessed Rank
4 kyu
Lowest Assessed Rank
6 kyu
Ad
Contributors
  • raulbc777 Avatar
  • g964 Avatar
  • user5036852 Avatar
  • Voile Avatar
  • rowcased Avatar
  • hobovsky Avatar
  • akar-0 Avatar
  • Just4FunCoder Avatar
  • 66  Avatar
Ad