RosettaCodeData/Task/Disarium-numbers/00-TASK.txt

32 lines
1009 B
Plaintext

A '''Disarium number''' is an integer where the sum of each digit raised to the power of its position in the number, is equal to the number.
;E.G.
'''135''' is a '''Disarium number''':
<span style=font-size:125%;font-weight:bold;padding-left:3em;> 1<sup>1</sup> + 3<sup>2</sup> + 5<sup>3</sup> == 1 + 9 + 125 == 135</span>
There are a finite number of '''Disarium numbers'''.
;Task
* Find and display the first 18 '''Disarium numbers'''.
;Stretch
* Find and display all 20 '''Disarium numbers'''.
;See also
;* [https://www.geeksforgeeks.org/disarium-number/ Geeks for Geeks - Disarium numbers]
;* [[oeis:A032799|OEIS:A032799 - Numbers n such that n equals the sum of its digits raised to the consecutive powers (1,2,3,...)]]
;* [[Narcissistic_decimal_number|Related task: Narcissistic decimal number]]
;* [[Own_digits_power_sum|Related task: Own digits power sum]] <span style=font-size:75%;;padding-left:1em;>''Which seems to be the same task as Narcissistic decimal number...''</span>
<br>