{"action":"created","comment":{"url":"https://api.github.com/repos/rsandor/number-theory/pulls/comments/48514454","id":48514454,"diff_hunk":"@@ -0,0 +1,13 @@\n+'use strict';\n+\n+/**\n+  * Determines whether an integer is 'hexagonal'.\n+  * @param {Number} an integer x to test\n+  * @return {Boolean} Whether or not the x is hexagonal.\n+  * @module number-theory\n+  * @author Kelly Innes\n+  */\n+\n+module.exports = function isHexagonal(n) {\n+  return ((Math.sqrt((8 * n) + 1) + 1) / 4) % 1 === 0;","path":"lib/is_hexagonal.js","position":12,"original_position":12,"commit_id":"be179dbf77053a1b69de1eb7805db3d66c0645af","original_commit_id":"be179dbf77053a1b69de1eb7805db3d66c0645af","user":{"login":"rsandor","id":146592,"avatar_url":"https://avatars.githubusercontent.com/u/146592?v=3","gravatar_id":"","url":"https://api.github.com/users/rsandor","html_url":"https://github.com/rsandor","followers_url":"https://api.github.com/users/rsandor/followers","following_url":"https://api.github.com/users/rsandor/following{/other_user}","gists_url":"https://api.github.com/users/rsandor/gists{/gist_id}","starred_url":"https://api.github.com/users/rsandor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsandor/subscriptions","organizations_url":"https://api.github.com/users/rsandor/orgs","repos_url":"https://api.github.com/users/rsandor/repos","events_url":"https://api.github.com/users/rsandor/events{/privacy}","received_events_url":"https://api.github.com/users/rsandor/received_events","type":"User","site_admin":false},"body":"Perhaps a quick line note for the proof of this","created_at":"2015-12-29T00:08:28Z","updated_at":"2015-12-29T00:08:28Z","html_url":"https://github.com/rsandor/number-theory/pull/2#discussion_r48514454","pull_request_url":"https://api.github.com/repos/rsandor/number-theory/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/rsandor/number-theory/pulls/comments/48514454"},"html":{"href":"https://github.com/rsandor/number-theory/pull/2#discussion_r48514454"},"pull_request":{"href":"https://api.github.com/repos/rsandor/number-theory/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/rsandor/number-theory/pulls/2","id":54595738,"html_url":"https://github.com/rsandor/number-theory/pull/2","diff_url":"https://github.com/rsandor/number-theory/pull/2.diff","patch_url":"https://github.com/rsandor/number-theory/pull/2.patch","issue_url":"https://api.github.com/repos/rsandor/number-theory/issues/2","number":2,"state":"open","locked":false,"title":"Add functions for figurate numbers & abundant, deficient, and perfect numbers","user":{"login":"kellyi","id":4165523,"avatar_url":"https://avatars.githubusercontent.com/u/4165523?v=3","gravatar_id":"","url":"https://api.github.com/users/kellyi","html_url":"https://github.com/kellyi","followers_url":"https://api.github.com/users/kellyi/followers","following_url":"https://api.github.com/users/kellyi/following{/other_user}","gists_url":"https://api.github.com/users/kellyi/gists{/gist_id}","starred_url":"https://api.github.com/users/kellyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kellyi/subscriptions","organizations_url":"https://api.github.com/users/kellyi/orgs","repos_url":"https://api.github.com/users/kellyi/repos","events_url":"https://api.github.com/users/kellyi/events{/privacy}","received_events_url":"https://api.github.com/users/kellyi/received_events","type":"User","site_admin":false},"body":"Hi!\r\n\r\nI was working on writing a little library of number theory methods and came across this one, so I thought I'd just make a pull request to add a few of them.\r\n\r\nThis PR adds some functions to check for figurate numbers: triangle, square, pentagon, hexagon, heptagon, and octagon numbers. Each function returns a Boolean. I've also added functions to check for abundant, deficient, and perfect numbers -- also returning true/false.\r\n\r\nBest,\r\nKelly","created_at":"2015-12-26T01:58:33Z","updated_at":"2015-12-29T00:08:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3aa00f59fd725fd7ccf238690577c4cab675e526","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rsandor/number-theory/pulls/2/commits","review_comments_url":"https://api.github.com/repos/rsandor/number-theory/pulls/2/comments","review_comment_url":"https://api.github.com/repos/rsandor/number-theory/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rsandor/number-theory/issues/2/comments","statuses_url":"https://api.github.com/repos/rsandor/number-theory/statuses/be179dbf77053a1b69de1eb7805db3d66c0645af","head":{"label":"kellyi:master","ref":"master","sha":"be179dbf77053a1b69de1eb7805db3d66c0645af","user":{"login":"kellyi","id":4165523,"avatar_url":"https://avatars.githubusercontent.com/u/4165523?v=3","gravatar_id":"","url":"https://api.github.com/users/kellyi","html_url":"https://github.com/kellyi","followers_url":"https://api.github.com/users/kellyi/followers","following_url":"https://api.github.com/users/kellyi/following{/other_user}","gists_url":"https://api.github.com/users/kellyi/gists{/gist_id}","starred_url":"https://api.github.com/users/kellyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kellyi/subscriptions","organizations_url":"https://api.github.com/users/kellyi/orgs","repos_url":"https://api.github.com/users/kellyi/repos","events_url":"https://api.github.com/users/kellyi/events{/privacy}","received_events_url":"https://api.github.com/users/kellyi/received_events","type":"User","site_admin":false},"repo":{"id":48595238,"name":"number-theory","full_name":"kellyi/number-theory","owner":{"login":"kellyi","id":4165523,"avatar_url":"https://avatars.githubusercontent.com/u/4165523?v=3","gravatar_id":"","url":"https://api.github.com/users/kellyi","html_url":"https://github.com/kellyi","followers_url":"https://api.github.com/users/kellyi/followers","following_url":"https://api.github.com/users/kellyi/following{/other_user}","gists_url":"https://api.github.com/users/kellyi/gists{/gist_id}","starred_url":"https://api.github.com/users/kellyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kellyi/subscriptions","organizations_url":"https://api.github.com/users/kellyi/orgs","repos_url":"https://api.github.com/users/kellyi/repos","events_url":"https://api.github.com/users/kellyi/events{/privacy}","received_events_url":"https://api.github.com/users/kellyi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kellyi/number-theory","description":"Number theory functions for javascript.","fork":true,"url":"https://api.github.com/repos/kellyi/number-theory","forks_url":"https://api.github.com/repos/kellyi/number-theory/forks","keys_url":"https://api.github.com/repos/kellyi/number-theory/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kellyi/number-theory/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kellyi/number-theory/teams","hooks_url":"https://api.github.com/repos/kellyi/number-theory/hooks","issue_events_url":"https://api.github.com/repos/kellyi/number-theory/issues/events{/number}","events_url":"https://api.github.com/repos/kellyi/number-theory/events","assignees_url":"https://api.github.com/repos/kellyi/number-theory/assignees{/user}","branches_url":"https://api.github.com/repos/kellyi/number-theory/branches{/branch}","tags_url":"https://api.github.com/repos/kellyi/number-theory/tags","blobs_url":"https://api.github.com/repos/kellyi/number-theory/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kellyi/number-theory/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kellyi/number-theory/git/refs{/sha}","trees_url":"https://api.github.com/repos/kellyi/number-theory/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kellyi/number-theory/statuses/{sha}","languages_url":"https://api.github.com/repos/kellyi/number-theory/languages","stargazers_url":"https://api.github.com/repos/kellyi/number-theory/stargazers","contributors_url":"https://api.github.com/repos/kellyi/number-theory/contributors","subscribers_url":"https://api.github.com/repos/kellyi/number-theory/subscribers","subscription_url":"https://api.github.com/repos/kellyi/number-theory/subscription","commits_url":"https://api.github.com/repos/kellyi/number-theory/commits{/sha}","git_commits_url":"https://api.github.com/repos/kellyi/number-theory/git/commits{/sha}","comments_url":"https://api.github.com/repos/kellyi/number-theory/comments{/number}","issue_comment_url":"https://api.github.com/repos/kellyi/number-theory/issues/comments{/number}","contents_url":"https://api.github.com/repos/kellyi/number-theory/contents/{+path}","compare_url":"https://api.github.com/repos/kellyi/number-theory/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kellyi/number-theory/merges","archive_url":"https://api.github.com/repos/kellyi/number-theory/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kellyi/number-theory/downloads","issues_url":"https://api.github.com/repos/kellyi/number-theory/issues{/number}","pulls_url":"https://api.github.com/repos/kellyi/number-theory/pulls{/number}","milestones_url":"https://api.github.com/repos/kellyi/number-theory/milestones{/number}","notifications_url":"https://api.github.com/repos/kellyi/number-theory/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kellyi/number-theory/labels{/name}","releases_url":"https://api.github.com/repos/kellyi/number-theory/releases{/id}","created_at":"2015-12-26T00:56:58Z","updated_at":"2015-12-26T00:57:00Z","pushed_at":"2015-12-26T02:04:27Z","git_url":"git://github.com/kellyi/number-theory.git","ssh_url":"git@github.com:kellyi/number-theory.git","clone_url":"https://github.com/kellyi/number-theory.git","svn_url":"https://github.com/kellyi/number-theory","homepage":null,"size":36,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rsandor:master","ref":"master","sha":"89c0a56b13826d1728f6b323b961cabd58e90665","user":{"login":"rsandor","id":146592,"avatar_url":"https://avatars.githubusercontent.com/u/146592?v=3","gravatar_id":"","url":"https://api.github.com/users/rsandor","html_url":"https://github.com/rsandor","followers_url":"https://api.github.com/users/rsandor/followers","following_url":"https://api.github.com/users/rsandor/following{/other_user}","gists_url":"https://api.github.com/users/rsandor/gists{/gist_id}","starred_url":"https://api.github.com/users/rsandor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsandor/subscriptions","organizations_url":"https://api.github.com/users/rsandor/orgs","repos_url":"https://api.github.com/users/rsandor/repos","events_url":"https://api.github.com/users/rsandor/events{/privacy}","received_events_url":"https://api.github.com/users/rsandor/received_events","type":"User","site_admin":false},"repo":{"id":35744417,"name":"number-theory","full_name":"rsandor/number-theory","owner":{"login":"rsandor","id":146592,"avatar_url":"https://avatars.githubusercontent.com/u/146592?v=3","gravatar_id":"","url":"https://api.github.com/users/rsandor","html_url":"https://github.com/rsandor","followers_url":"https://api.github.com/users/rsandor/followers","following_url":"https://api.github.com/users/rsandor/following{/other_user}","gists_url":"https://api.github.com/users/rsandor/gists{/gist_id}","starred_url":"https://api.github.com/users/rsandor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsandor/subscriptions","organizations_url":"https://api.github.com/users/rsandor/orgs","repos_url":"https://api.github.com/users/rsandor/repos","events_url":"https://api.github.com/users/rsandor/events{/privacy}","received_events_url":"https://api.github.com/users/rsandor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rsandor/number-theory","description":"Number theory functions for javascript.","fork":false,"url":"https://api.github.com/repos/rsandor/number-theory","forks_url":"https://api.github.com/repos/rsandor/number-theory/forks","keys_url":"https://api.github.com/repos/rsandor/number-theory/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rsandor/number-theory/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rsandor/number-theory/teams","hooks_url":"https://api.github.com/repos/rsandor/number-theory/hooks","issue_events_url":"https://api.github.com/repos/rsandor/number-theory/issues/events{/number}","events_url":"https://api.github.com/repos/rsandor/number-theory/events","assignees_url":"https://api.github.com/repos/rsandor/number-theory/assignees{/user}","branches_url":"https://api.github.com/repos/rsandor/number-theory/branches{/branch}","tags_url":"https://api.github.com/repos/rsandor/number-theory/tags","blobs_url":"https://api.github.com/repos/rsandor/number-theory/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rsandor/number-theory/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rsandor/number-theory/git/refs{/sha}","trees_url":"https://api.github.com/repos/rsandor/number-theory/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rsandor/number-theory/statuses/{sha}","languages_url":"https://api.github.com/repos/rsandor/number-theory/languages","stargazers_url":"https://api.github.com/repos/rsandor/number-theory/stargazers","contributors_url":"https://api.github.com/repos/rsandor/number-theory/contributors","subscribers_url":"https://api.github.com/repos/rsandor/number-theory/subscribers","subscription_url":"https://api.github.com/repos/rsandor/number-theory/subscription","commits_url":"https://api.github.com/repos/rsandor/number-theory/commits{/sha}","git_commits_url":"https://api.github.com/repos/rsandor/number-theory/git/commits{/sha}","comments_url":"https://api.github.com/repos/rsandor/number-theory/comments{/number}","issue_comment_url":"https://api.github.com/repos/rsandor/number-theory/issues/comments{/number}","contents_url":"https://api.github.com/repos/rsandor/number-theory/contents/{+path}","compare_url":"https://api.github.com/repos/rsandor/number-theory/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rsandor/number-theory/merges","archive_url":"https://api.github.com/repos/rsandor/number-theory/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rsandor/number-theory/downloads","issues_url":"https://api.github.com/repos/rsandor/number-theory/issues{/number}","pulls_url":"https://api.github.com/repos/rsandor/number-theory/pulls{/number}","milestones_url":"https://api.github.com/repos/rsandor/number-theory/milestones{/number}","notifications_url":"https://api.github.com/repos/rsandor/number-theory/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rsandor/number-theory/labels{/name}","releases_url":"https://api.github.com/repos/rsandor/number-theory/releases{/id}","created_at":"2015-05-16T23:38:00Z","updated_at":"2015-09-15T14:16:48Z","pushed_at":"2015-12-26T02:04:28Z","git_url":"git://github.com/rsandor/number-theory.git","ssh_url":"git@github.com:rsandor/number-theory.git","clone_url":"https://github.com/rsandor/number-theory.git","svn_url":"https://github.com/rsandor/number-theory","homepage":null,"size":210,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rsandor/number-theory/pulls/2"},"html":{"href":"https://github.com/rsandor/number-theory/pull/2"},"issue":{"href":"https://api.github.com/repos/rsandor/number-theory/issues/2"},"comments":{"href":"https://api.github.com/repos/rsandor/number-theory/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/rsandor/number-theory/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/rsandor/number-theory/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rsandor/number-theory/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/rsandor/number-theory/statuses/be179dbf77053a1b69de1eb7805db3d66c0645af"}}}}