Number Utilities

Is Armstrong Number

Validates whether a number is an Armstrong number (narcissistic number) — where the sum of its digits raised to the power of digit count equals the original number. Access via MCP in Cursor or Windsurf for instant verification, or hit GET /v1/number/is-armstrong with your number. Example: 153 is Armstrong because 1³ + 5³ + 3³ = 153. Returns deterministic boolean result.

API Endpoint

GET /v1/number/is-armstrong

Code Examples

curl "https://tinyfn.io/v1/number/is-armstrong" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/number/is-armstrong', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/number/is-armstrong',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's number tools:

{
  "mcpServers": {
    "tinyfn-number": {
      "url": "https://tinyfn.io/mcp/number",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

What is an Armstrong number and how is it calculated?

An Armstrong number equals the sum of its digits raised to the power of the total digit count. For 153: 1³ + 5³ + 3³ = 1 + 125 + 27 = 153.

How do I check if a number is Armstrong using MCP?

Call the is-armstrong tool from any MCP-enabled editor like Cursor or Claude Code with your number parameter. Returns true/false instantly without manual calculation.

What's the difference between Armstrong and narcissistic numbers?

They're the same concept — narcissistic number is the mathematical term, Armstrong number is the common programming term. Both follow identical calculation rules.

Does this work with large numbers or only single digits?

Works with any positive integer. Single digits (0-9) are always Armstrong numbers since n¹ = n. Multi-digit examples include 153, 371, 9474.

What format does the API return for Armstrong number validation?

Returns a boolean JSON response indicating whether the input number satisfies the Armstrong number condition. No ambiguous text responses.

Try Is Armstrong Number Now

Get your free API key and start using Is Armstrong Number in seconds.

Get Free API Key