Get the App
SLTechnology News&Howtos  ›  Development  › 

How to calculate the number of daffodils with js

Shulou Source: shulou.com Published: 2022-06-02 15:52:53 10月03日 Update

This article mainly introduces "how to use js to find the number of daffodils". In the daily operation, I believe many people have doubts about how to use js to find the number of daffodils. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful for you to answer the doubt of "how to use js to find the number of daffodils". Next, please follow the editor to study!

The number of daffodils refers to an n-digit positive integer (n ≥ 3) whose sum of the n powers of each digit is equal to itself. (for example: 1 ^ 3 + 5 ^ 3 + 3 ^ 3 = 153) the number of daffodils is only one kind of self-power, strictly speaking, the third power of three digits becomes the number of daffodils.

The number of daffodils is only a kind of self-power number.

The self-exponent name of other digits:

A power number: celibacy

Two digits from the power: no

Three-digit self-power: number of daffodils

Four-digit self-power: the number of four-leaf roses

Five-digit self-power: five-pointed star number

Six-digit self-power number: hexagonal number

Seven-digit self-power: the number of the Big Dipper seven stars

Eight-digit self-power: eight immortals

Nine-digit self-power number: ninety-nine double Yang number

Ten-digit self-power: perfect number

Number of common daffodils

The number of daffodils is also known as Armstrong number.

The total number of daffodils is 4: 153370371407

There are three four-leaf roses: 1634, 8208, 9474

There are three five-pointed stars: 54748, 92727, 93084.

There is only one six-digit number: 548834.

There are four seven stars in the Big Dipper: 1741725, 4210818, 9800817, 9926315.

There are three eight immortal flowers: 24678050, 24678051, 88593477.

Implementation of js Narcissus number Code

FunctionSelfPower (minnum,maxnum) {

Varresult= ""

For (vari=minnum;i

Tags: Daffodils begging for water learning five-pointed stars digits eight immortals the Big Dipper just numbers more roses six seven stars five horns the Big Dipper help practical perfect Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Docker Xiaomi Shulou Information Shulou Tech Info