Skip to content

[FEATURE]: Add Harshad numbers #1802

@ridge-kimani

Description

@ridge-kimani

Motivation

  • A Harshad number (also known as a Niven number) is an integer that is divisible by the sum of its digits.
  • Harshad numbers are sometimes called “happy numbers” in recreational mathematics, because they have a simple, satisfying property: their digit sum divides them evenly. They are widely studied in number theory and often appear in math puzzles, programming challenges, and teaching exercises.

Examples

18 is a Harshad number because 1 + 8 = 9 and 18 % 9 === 0.

19 is not, because 1 + 9 = 10 and 19 % 10 !== 0

Possible workarounds

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions