Title: [FEATURE]: Add Harshad numbers · Issue #1802 · TheAlgorithms/JavaScript · GitHub
Open Graph Title: [FEATURE]: Add Harshad numbers · Issue #1802 · TheAlgorithms/JavaScript
X Title: [FEATURE]: Add Harshad numbers · Issue #1802 · TheAlgorithms/JavaScript
Description: 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...
Open Graph Description: 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...
X Description: 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...
Opengraph URL: https://github.com/TheAlgorithms/JavaScript/issues/1802
X: @github
Domain: redirect.github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[FEATURE]: Add Harshad numbers","articleBody":"### Motivation\n\n- A Harshad number (also known as a Niven number) is an integer that is divisible by the sum of its digits.\n- 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.\n\n### Examples\n\n18 is a Harshad number because 1 + 8 = 9 and 18 % 9 === 0.\n\n19 is not, because 1 + 9 = 10 and 19 % 10 !== 0\n\n### Possible workarounds\n\n_No response_\n\n### Additional information\n\n_No response_","author":{"url":"https://github.com/ridge-kimani","@type":"Person","name":"ridge-kimani"},"datePublished":"2025-09-24T18:31:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/1802/JavaScript/issues/1802"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:8a2987ab-d953-66cd-ce66-e69e8417ee52 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BC62:26BEF2:A5524A:D6B079:696B20F5 |
| html-safe-nonce | 74a23a0efbe8bc3a28761c1995c26eb4fcc70792c031433b9eb7524b11936a85 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzYyOjI2QkVGMjpBNTUyNEE6RDZCMDc5OjY5NkIyMEY1IiwidmlzaXRvcl9pZCI6Ijg3MzQ5MDUxNTg5NDEyMjExMDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ff3e16898b1312e43a66ff7bfb7012c6f194050b70ba92ef903efa01bf90a9a2 |
| hovercard-subject-tag | issue:3450490729 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/TheAlgorithms/JavaScript/1802/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a37af3b61e6121098bf4e6f079d125644bb685da5bd34c38c75a896927b7e14b/TheAlgorithms/JavaScript/issues/1802 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a37af3b61e6121098bf4e6f079d125644bb685da5bd34c38c75a896927b7e14b/TheAlgorithms/JavaScript/issues/1802 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ridge-kimani |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/TheAlgorithms/JavaScript git https://github.com/TheAlgorithms/JavaScript.git |
| octolytics-dimension-user_id | 20487725 |
| octolytics-dimension-user_login | TheAlgorithms |
| octolytics-dimension-repository_id | 97086543 |
| octolytics-dimension-repository_nwo | TheAlgorithms/JavaScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 97086543 |
| octolytics-dimension-repository_network_root_nwo | TheAlgorithms/JavaScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width