6 kyu

Simple Fun #146: Chandos Number

127 of 389myjinxin2015

Description:

Task

The sequence of Chando is an infinite sequence of all Chando's numbers in ascending order.

A number is called Chando's if it is an integer that can be represented as a sum of different positive integer powers of 5.

The first Chando's numbers is 5 (5^1). And the following nth Chando's numbers are:

25  (5^2)
30  (5^1 + 5^2)
125 (5^3)
130 (5^1 + 5^3)
150 (5^2 + 5^3)
...
...

Your task is to find the Chando's nth number for a given n.

Input/Output

  • [input] integer n

1 <= n <= 7000

  • [output] an integer

nth Chando's number

Algorithms
Number Theory

Stats:

CreatedFeb 20, 2017
PublishedFeb 20, 2017
Warriors Trained1429
Total Skips49
Total Code Submissions1508
Total Times Completed389
JavaScript Completions127
C# Completions51
Python Completions199
Ruby Completions32
Crystal Completions11
Haskell Completions26
Scala Completions10
Total Stars35
% of votes with a positive feedback rating95% of 114
Total "Very Satisfied" Votes105
Total "Somewhat Satisfied" Votes7
Total "Not Satisfied" Votes2
Total Rank Assessments5
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
6 kyu
Ad
Contributors
  • myjinxin2015 Avatar
  • GiacomoSorbi Avatar
  • JohanWiltink Avatar
  • Voile Avatar
  • hobovsky Avatar
  • dfhwze Avatar
  • Just4FunCoder Avatar
  • KayleighWasTaken Avatar
  • saudiGuy Avatar
Ad