{"action":"created","comment":{"url":"https://api.github.com/repos/sympy/sympy/pulls/comments/22761285","id":22761285,"diff_hunk":"@@ -1304,6 +1304,90 @@ def divisor_count(n, modulus=1):\n     return Mul(*[v + 1 for k, v in factorint(n).items() if k > 1])\n \n \n+def _udivisors(n):\n+    \"\"\"Helper function for udivisors which generates the unitary divisors.\"\"\"\n+\n+    factorpows = [p**e for p, e in factorint(n).items()]\n+    for i in xrange(2**len(factorpows)):\n+        d, j = 1, i\n+        for k in xrange(i.bit_length()):","path":"sympy/ntheory/factor_.py","position":10,"original_position":10,"commit_id":"0335e2528634a0ad2bd9d648c98f6520f111b100","original_commit_id":"0335e2528634a0ad2bd9d648c98f6520f111b100","user":{"login":"kaushik94","id":6545467,"avatar_url":"https://avatars.githubusercontent.com/u/6545467?v=3","gravatar_id":"","url":"https://api.github.com/users/kaushik94","html_url":"https://github.com/kaushik94","followers_url":"https://api.github.com/users/kaushik94/followers","following_url":"https://api.github.com/users/kaushik94/following{/other_user}","gists_url":"https://api.github.com/users/kaushik94/gists{/gist_id}","starred_url":"https://api.github.com/users/kaushik94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaushik94/subscriptions","organizations_url":"https://api.github.com/users/kaushik94/orgs","repos_url":"https://api.github.com/users/kaushik94/repos","events_url":"https://api.github.com/users/kaushik94/events{/privacy}","received_events_url":"https://api.github.com/users/kaushik94/received_events","type":"User","site_admin":false},"body":"`bit_length()` method is only valid from ptyhon 2.7, whereas sympy is compatible with 2.6 and less, my two cents ","created_at":"2015-01-10T19:15:05Z","updated_at":"2015-01-10T19:15:05Z","html_url":"https://github.com/sympy/sympy/pull/8793#discussion_r22761285","pull_request_url":"https://api.github.com/repos/sympy/sympy/pulls/8793","_links":{"self":{"href":"https://api.github.com/repos/sympy/sympy/pulls/comments/22761285"},"html":{"href":"https://github.com/sympy/sympy/pull/8793#discussion_r22761285"},"pull_request":{"href":"https://api.github.com/repos/sympy/sympy/pulls/8793"}}},"pull_request":{"url":"https://api.github.com/repos/sympy/sympy/pulls/8793","id":27140873,"html_url":"https://github.com/sympy/sympy/pull/8793","diff_url":"https://github.com/sympy/sympy/pull/8793.diff","patch_url":"https://github.com/sympy/sympy/pull/8793.patch","issue_url":"https://api.github.com/repos/sympy/sympy/issues/8793","number":8793,"state":"open","locked":false,"title":"unitary divisors","user":{"login":"postvakje","id":8390828,"avatar_url":"https://avatars.githubusercontent.com/u/8390828?v=3","gravatar_id":"","url":"https://api.github.com/users/postvakje","html_url":"https://github.com/postvakje","followers_url":"https://api.github.com/users/postvakje/followers","following_url":"https://api.github.com/users/postvakje/following{/other_user}","gists_url":"https://api.github.com/users/postvakje/gists{/gist_id}","starred_url":"https://api.github.com/users/postvakje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postvakje/subscriptions","organizations_url":"https://api.github.com/users/postvakje/orgs","repos_url":"https://api.github.com/users/postvakje/repos","events_url":"https://api.github.com/users/postvakje/events{/privacy}","received_events_url":"https://api.github.com/users/postvakje/received_events","type":"User","site_admin":false},"body":"functions for generating and counting the unitary divisors of a number.\r\nhttp://en.wikipedia.org/wiki/Unitary_divisor","created_at":"2015-01-10T00:57:29Z","updated_at":"2015-01-10T19:15:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f44b8486d3a875280f7d16c3e1ec1a0c3175a98d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sympy/sympy/pulls/8793/commits","review_comments_url":"https://api.github.com/repos/sympy/sympy/pulls/8793/comments","review_comment_url":"https://api.github.com/repos/sympy/sympy/pulls/comments/{number}","comments_url":"https://api.github.com/repos/sympy/sympy/issues/8793/comments","statuses_url":"https://api.github.com/repos/sympy/sympy/statuses/0335e2528634a0ad2bd9d648c98f6520f111b100","head":{"label":"postvakje:unitarydivisors","ref":"unitarydivisors","sha":"0335e2528634a0ad2bd9d648c98f6520f111b100","user":{"login":"postvakje","id":8390828,"avatar_url":"https://avatars.githubusercontent.com/u/8390828?v=3","gravatar_id":"","url":"https://api.github.com/users/postvakje","html_url":"https://github.com/postvakje","followers_url":"https://api.github.com/users/postvakje/followers","following_url":"https://api.github.com/users/postvakje/following{/other_user}","gists_url":"https://api.github.com/users/postvakje/gists{/gist_id}","starred_url":"https://api.github.com/users/postvakje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postvakje/subscriptions","organizations_url":"https://api.github.com/users/postvakje/orgs","repos_url":"https://api.github.com/users/postvakje/repos","events_url":"https://api.github.com/users/postvakje/events{/privacy}","received_events_url":"https://api.github.com/users/postvakje/received_events","type":"User","site_admin":false},"repo":{"id":22775145,"name":"sympy","full_name":"postvakje/sympy","owner":{"login":"postvakje","id":8390828,"avatar_url":"https://avatars.githubusercontent.com/u/8390828?v=3","gravatar_id":"","url":"https://api.github.com/users/postvakje","html_url":"https://github.com/postvakje","followers_url":"https://api.github.com/users/postvakje/followers","following_url":"https://api.github.com/users/postvakje/following{/other_user}","gists_url":"https://api.github.com/users/postvakje/gists{/gist_id}","starred_url":"https://api.github.com/users/postvakje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postvakje/subscriptions","organizations_url":"https://api.github.com/users/postvakje/orgs","repos_url":"https://api.github.com/users/postvakje/repos","events_url":"https://api.github.com/users/postvakje/events{/privacy}","received_events_url":"https://api.github.com/users/postvakje/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/postvakje/sympy","description":"A computer algebra system written in pure Python","fork":true,"url":"https://api.github.com/repos/postvakje/sympy","forks_url":"https://api.github.com/repos/postvakje/sympy/forks","keys_url":"https://api.github.com/repos/postvakje/sympy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/postvakje/sympy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/postvakje/sympy/teams","hooks_url":"https://api.github.com/repos/postvakje/sympy/hooks","issue_events_url":"https://api.github.com/repos/postvakje/sympy/issues/events{/number}","events_url":"https://api.github.com/repos/postvakje/sympy/events","assignees_url":"https://api.github.com/repos/postvakje/sympy/assignees{/user}","branches_url":"https://api.github.com/repos/postvakje/sympy/branches{/branch}","tags_url":"https://api.github.com/repos/postvakje/sympy/tags","blobs_url":"https://api.github.com/repos/postvakje/sympy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/postvakje/sympy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/postvakje/sympy/git/refs{/sha}","trees_url":"https://api.github.com/repos/postvakje/sympy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/postvakje/sympy/statuses/{sha}","languages_url":"https://api.github.com/repos/postvakje/sympy/languages","stargazers_url":"https://api.github.com/repos/postvakje/sympy/stargazers","contributors_url":"https://api.github.com/repos/postvakje/sympy/contributors","subscribers_url":"https://api.github.com/repos/postvakje/sympy/subscribers","subscription_url":"https://api.github.com/repos/postvakje/sympy/subscription","commits_url":"https://api.github.com/repos/postvakje/sympy/commits{/sha}","git_commits_url":"https://api.github.com/repos/postvakje/sympy/git/commits{/sha}","comments_url":"https://api.github.com/repos/postvakje/sympy/comments{/number}","issue_comment_url":"https://api.github.com/repos/postvakje/sympy/issues/comments/{number}","contents_url":"https://api.github.com/repos/postvakje/sympy/contents/{+path}","compare_url":"https://api.github.com/repos/postvakje/sympy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/postvakje/sympy/merges","archive_url":"https://api.github.com/repos/postvakje/sympy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/postvakje/sympy/downloads","issues_url":"https://api.github.com/repos/postvakje/sympy/issues{/number}","pulls_url":"https://api.github.com/repos/postvakje/sympy/pulls{/number}","milestones_url":"https://api.github.com/repos/postvakje/sympy/milestones{/number}","notifications_url":"https://api.github.com/repos/postvakje/sympy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/postvakje/sympy/labels{/name}","releases_url":"https://api.github.com/repos/postvakje/sympy/releases{/id}","created_at":"2014-08-09T00:14:28Z","updated_at":"2015-01-09T21:51:27Z","pushed_at":"2015-01-10T01:07:28Z","git_url":"git://github.com/postvakje/sympy.git","ssh_url":"git@github.com:postvakje/sympy.git","clone_url":"https://github.com/postvakje/sympy.git","svn_url":"https://github.com/postvakje/sympy","homepage":"http://sympy.org/","size":65972,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"sympy:master","ref":"master","sha":"b0e448e58369b168e9b28f683dad4d2699117314","user":{"login":"sympy","id":260832,"avatar_url":"https://avatars.githubusercontent.com/u/260832?v=3","gravatar_id":"","url":"https://api.github.com/users/sympy","html_url":"https://github.com/sympy","followers_url":"https://api.github.com/users/sympy/followers","following_url":"https://api.github.com/users/sympy/following{/other_user}","gists_url":"https://api.github.com/users/sympy/gists{/gist_id}","starred_url":"https://api.github.com/users/sympy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sympy/subscriptions","organizations_url":"https://api.github.com/users/sympy/orgs","repos_url":"https://api.github.com/users/sympy/repos","events_url":"https://api.github.com/users/sympy/events{/privacy}","received_events_url":"https://api.github.com/users/sympy/received_events","type":"Organization","site_admin":false},"repo":{"id":640534,"name":"sympy","full_name":"sympy/sympy","owner":{"login":"sympy","id":260832,"avatar_url":"https://avatars.githubusercontent.com/u/260832?v=3","gravatar_id":"","url":"https://api.github.com/users/sympy","html_url":"https://github.com/sympy","followers_url":"https://api.github.com/users/sympy/followers","following_url":"https://api.github.com/users/sympy/following{/other_user}","gists_url":"https://api.github.com/users/sympy/gists{/gist_id}","starred_url":"https://api.github.com/users/sympy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sympy/subscriptions","organizations_url":"https://api.github.com/users/sympy/orgs","repos_url":"https://api.github.com/users/sympy/repos","events_url":"https://api.github.com/users/sympy/events{/privacy}","received_events_url":"https://api.github.com/users/sympy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sympy/sympy","description":"A computer algebra system written in pure Python","fork":false,"url":"https://api.github.com/repos/sympy/sympy","forks_url":"https://api.github.com/repos/sympy/sympy/forks","keys_url":"https://api.github.com/repos/sympy/sympy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sympy/sympy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sympy/sympy/teams","hooks_url":"https://api.github.com/repos/sympy/sympy/hooks","issue_events_url":"https://api.github.com/repos/sympy/sympy/issues/events{/number}","events_url":"https://api.github.com/repos/sympy/sympy/events","assignees_url":"https://api.github.com/repos/sympy/sympy/assignees{/user}","branches_url":"https://api.github.com/repos/sympy/sympy/branches{/branch}","tags_url":"https://api.github.com/repos/sympy/sympy/tags","blobs_url":"https://api.github.com/repos/sympy/sympy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sympy/sympy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sympy/sympy/git/refs{/sha}","trees_url":"https://api.github.com/repos/sympy/sympy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sympy/sympy/statuses/{sha}","languages_url":"https://api.github.com/repos/sympy/sympy/languages","stargazers_url":"https://api.github.com/repos/sympy/sympy/stargazers","contributors_url":"https://api.github.com/repos/sympy/sympy/contributors","subscribers_url":"https://api.github.com/repos/sympy/sympy/subscribers","subscription_url":"https://api.github.com/repos/sympy/sympy/subscription","commits_url":"https://api.github.com/repos/sympy/sympy/commits{/sha}","git_commits_url":"https://api.github.com/repos/sympy/sympy/git/commits{/sha}","comments_url":"https://api.github.com/repos/sympy/sympy/comments{/number}","issue_comment_url":"https://api.github.com/repos/sympy/sympy/issues/comments/{number}","contents_url":"https://api.github.com/repos/sympy/sympy/contents/{+path}","compare_url":"https://api.github.com/repos/sympy/sympy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sympy/sympy/merges","archive_url":"https://api.github.com/repos/sympy/sympy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sympy/sympy/downloads","issues_url":"https://api.github.com/repos/sympy/sympy/issues{/number}","pulls_url":"https://api.github.com/repos/sympy/sympy/pulls{/number}","milestones_url":"https://api.github.com/repos/sympy/sympy/milestones{/number}","notifications_url":"https://api.github.com/repos/sympy/sympy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sympy/sympy/labels{/name}","releases_url":"https://api.github.com/repos/sympy/sympy/releases{/id}","created_at":"2010-04-30T20:37:14Z","updated_at":"2015-01-10T11:43:28Z","pushed_at":"2015-01-10T11:43:27Z","git_url":"git://github.com/sympy/sympy.git","ssh_url":"git@github.com:sympy/sympy.git","clone_url":"https://github.com/sympy/sympy.git","svn_url":"https://github.com/sympy/sympy","homepage":"http://sympy.org/","size":137203,"stargazers_count":1868,"watchers_count":1868,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":882,"mirror_url":null,"open_issues_count":1799,"forks":882,"open_issues":1799,"watchers":1868,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sympy/sympy/pulls/8793"},"html":{"href":"https://github.com/sympy/sympy/pull/8793"},"issue":{"href":"https://api.github.com/repos/sympy/sympy/issues/8793"},"comments":{"href":"https://api.github.com/repos/sympy/sympy/issues/8793/comments"},"review_comments":{"href":"https://api.github.com/repos/sympy/sympy/pulls/8793/comments"},"review_comment":{"href":"https://api.github.com/repos/sympy/sympy/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/sympy/sympy/pulls/8793/commits"},"statuses":{"href":"https://api.github.com/repos/sympy/sympy/statuses/0335e2528634a0ad2bd9d648c98f6520f111b100"}}}}