An Armstrong number is an *n*-digit number that is equal to the sum of the *n*^{th} powers of its digits. In this lesson, students will explore Armstrong numbers, identify all Armstrong numbers less thanÂ 1000, and investigate a recursive sequence that uses a similar process. Throughout the lesson, students will use spreadsheets or other technology.

Explain to students that they will be implementing the following process for several numbers:

- Raise each digit to a power equal to the number of digits in the number. For instance, each digit of a fourâ€‘digit number would be raised to the fourth power; each digit of a fiveâ€‘digit number would be raised to the fifth power; and so on.
- Add the results.

Demonstrate this process for 123â€”because 123 is a three-digit number, raise each digit to the third power, and add: 1^{3}Â +Â 2^{3}Â +Â 3^{3}Â =Â 36. If necessary, show other examples. Then, have students implement the process for the following numbers:

6 Â Â Â 23 Â Â 99 Â Â 231 Â Â Â 1634 Â Â Â 11,111

Students are likely to notice that two numbers from this listâ€”6 and 1634â€”return their original value when this process is applied; that is, 6^{1}Â =Â 6, and 1^{4}Â +Â 6^{4}Â +Â 3^{4}Â +Â 4^{4}Â =Â 1634.

Inform students that numbers which return their original value are known as *Armstrong numbers*. Once you are certain that all students understand this idea, allow them to work in pairs to create a succinct definition of Armstrong numbers. After a few minutes, have each group share their definition with another pair, and then allow the class to vote on which definition is most lucid and precise. For comparison, share the following formal definition:

Â **Armstrong number:** An *n*-digit number equal to the sum of the *n*^{th} powers of its digits.

*Finding Armstrong Numbers*

In examining the numbers above, students found thatÂ 6 andÂ 1634 were Armstrong numbers. Now ask them to determine all Armstrong numbers less thanÂ 1000.

[message_box title=”Program” color=”red”]

/* C program to check whether a number entered by user is Armstrong or not. */

/* Written by Utpal Chaudhary */

/*Student of L.D COLLEGE OF ENGINEERING,Ahmedabad-15,Gujarat */

#include <stdio.h>

#include <conio.h>

void main()

{

int num, temp, remainder, sum=0;

printf (“Enter a positive integer= “);

scanf (“%d”, &num);

temp=num;

while(num > 0)

{

remainder=n1%10;

sum =sum + (remainder * remainder * remainder);

num=num/10;

}

if(sum==temp)

{

printf(“%d is an Armstrong number.”,temp);

}

else

{

printf(“%d is not an Armstrong number.”,temp);

}

getch();

}

[/message_box]

[message_box title=”Output 1″ color=”red”]

Enter a positive integer=153

153 is an Armstrong number.

[/message_box]

[message_box title=”Output 2″ color=”red”]

Enter a positive integer=55

55 is not an Armstrong number.

[/message_box]

[message_box title=”” color=”yellow”]

**Note** :If you want to check n digit positive integer number isÂ Armstrong or notÂ Armstrong then in place of 3 times multiplication of remainder take n times multiplication of remainder in above program.

[/message_box]

## Leave a Reply