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: 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":3},"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:a28d10e0-2803-2ca9-faee-b3ac214f6c68 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A276:3C5D39:343437:4CAD2B:6A62F237 |
| html-safe-nonce | 6b0c1d981b7ad112c64eb65c5ea826490b71794f39b964bc83955711a570c689 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjc2OjNDNUQzOTozNDM0Mzc6NENBRDJCOjZBNjJGMjM3IiwidmlzaXRvcl9pZCI6IjM5ODYwMzI0MTMzMDc0OTkwNjMiLCJyZWdpb25fZWRnZSI6Indlc3R1czIiLCJyZWdpb25fcmVuZGVyIjoid2VzdHVzMiJ9 |
| visitor-hmac | af4506cfc55a5e9608c528a3f66e0d10f463a2d030a9897e49a697459bae87e8 |
| 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/76994d0c8ace18930744252c09540c7fec12574f625f46304e065a626e54a7d3/TheAlgorithms/JavaScript/issues/1802 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/76994d0c8ace18930744252c09540c7fec12574f625f46304e065a626e54a7d3/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 | b415018e190e73858133ddcaa36acce7b3f3572fe54dda84bd3b21a6ec714c30 |
| 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 | 22f98521e99f504294ab0812b66104d50eb75a70 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width