Narcissistic decimal number: Difference between revisions
Content added Content deleted
m (→{{header|FreeBASIC}}: out tag) |
m (added a note about Armstrong numbers.) |
||
Line 1: | Line 1: | ||
{{task}} |
{{task}} |
||
A [http://mathworld.wolfram.com/NarcissisticNumber.html Narcissistic decimal number] is a non-negative integer, <math>n</math>, that is equal to the sum of the <math>m</math>-th powers of each of the digits in the decimal representation of <math>n</math>, where <math>m</math> is the number of digits in the decimal representation of <math>n</math>. |
A [http://mathworld.wolfram.com/NarcissisticNumber.html Narcissistic decimal number] is a non-negative integer, <math>n</math>, that is equal to the sum of the <math>m</math>-th powers of each of the digits in the decimal representation of <math>n</math>, where <math>m</math> is the number of digits in the decimal representation of <math>n</math>. |
||
Narcissistic (decimal) numbers are sometimes called '''Armstrong''' numbers, named after Michael F. Armstrong. |
|||
For example, if <math>n</math> is 153 then <math>m</math>, the number of digits, is 3 and we have <math>1^3+5^3+3^3 = 1+125+27 = 153</math> and so 153 is a narcissistic decimal number. |
For example, if <math>n</math> is 153 then <math>m</math>, the number of digits, is 3 and we have <math>1^3+5^3+3^3 = 1+125+27 = 153</math> and so 153 is a narcissistic decimal number. |