{"action":"opened","issue":{"url":"https://api.github.com/repos/sympy/sympy/issues/11712","repository_url":"https://api.github.com/repos/sympy/sympy","labels_url":"https://api.github.com/repos/sympy/sympy/issues/11712/labels{/name}","comments_url":"https://api.github.com/repos/sympy/sympy/issues/11712/comments","events_url":"https://api.github.com/repos/sympy/sympy/issues/11712/events","html_url":"https://github.com/sympy/sympy/issues/11712","id":182046449,"number":11712,"title":"Problem when solving binary diophantine (Pell) equation ","user":{"login":"o-alexandre-felipe","id":19939799,"avatar_url":"https://avatars.githubusercontent.com/u/19939799?v=3","gravatar_id":"","url":"https://api.github.com/users/o-alexandre-felipe","html_url":"https://github.com/o-alexandre-felipe","followers_url":"https://api.github.com/users/o-alexandre-felipe/followers","following_url":"https://api.github.com/users/o-alexandre-felipe/following{/other_user}","gists_url":"https://api.github.com/users/o-alexandre-felipe/gists{/gist_id}","starred_url":"https://api.github.com/users/o-alexandre-felipe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/o-alexandre-felipe/subscriptions","organizations_url":"https://api.github.com/users/o-alexandre-felipe/orgs","repos_url":"https://api.github.com/users/o-alexandre-felipe/repos","events_url":"https://api.github.com/users/o-alexandre-felipe/events{/privacy}","received_events_url":"https://api.github.com/users/o-alexandre-felipe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-10T15:36:42Z","updated_at":"2016-10-10T15:36:42Z","closed_at":null,"body":"The function diop_solve finds two family of solutions for the equation y**2 + 12*(2*x + 1)**2 - y**2 = 3.\r\nIf a substitute the output value on the original equation and it is not satisfied for one of these families.\r\n\r\ndef test_case():\r\n  from sympy.solvers import diophantine;\r\n  import sympy;\r\n  (x,y,k) = sympy.symbols('x,y,k', integers=True);\r\n  eq = -y**2 + 12*(2*x + 1)**2 - 3;\r\n  for SolX, SolY in diophantine.diop_solve(eq, k):\r\n    print SolX, SolY;\r\n    for i in xrange(0, 10):\r\n      _x, _y = int(SolX.subs({k: i})), int(SolY.subs({k: i}));\r\n      print eq.subs({x:_x,y:_y}).expand();"}}
{"actor":{"display_login":"o-alexandre-felipe"}}