Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peterson Number in Java #65

Open
sujana-kamasany opened this issue Feb 17, 2022 · 2 comments
Open

Peterson Number in Java #65

sujana-kamasany opened this issue Feb 17, 2022 · 2 comments
Assignees
Labels
good first issue Good for newcomers Hacktoberfest-Accepted Make your Pull Request for Hacktoberfest 2023 Java Basic Java Programs

Comments

@sujana-kamasany
Copy link
Owner

Java Program to check whether a given number is Peterson or not through a Java program.

Peterson Number

A number is said to be Peterson if the sum of factorials of each digit is equal to the sum of the number itself.

  • Suppose, we have to check the number (n) 145 is Peterson or not.

Number = 145

145 = !1 + !4 + !5

=1+4321+5432*1

=1+24+120

145=145

We observe that the number and the sum of factorials of digits are equal to the number itself. Hence, 145 is a Peterson number.

@sujana-kamasany sujana-kamasany added good first issue Good for newcomers Java Basic Java Programs labels Feb 17, 2022
@TaeyeonRoyce
Copy link
Contributor

Please, assign me! I'd like to solve this!

@sujana-kamasany
Copy link
Owner Author

Please, assign me! I'd like to solve this!

@TaeyeonRoyce Assigned, Thank you for contributing

@sujana-kamasany sujana-kamasany added the Hacktoberfest-Accepted Make your Pull Request for Hacktoberfest 2023 label Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Hacktoberfest-Accepted Make your Pull Request for Hacktoberfest 2023 Java Basic Java Programs
Projects
None yet
Development

No branches or pull requests

2 participants