zoukankan      html  css  js  c++  java
  • Fundamental Solution to Pell's Equation

    From Wikipedia,

    Pell's equation

    is any Diophantine equation of the form

    where n is a nonsquare integer and x and y are integers.

    We can calculate the x,y for certain n with the following codes:

     It returns:

    Fundamental Solution to Pell's Equation X^2-1001Y^2=1 was:
    -------------------------------------------------------
    X=1060905
    Y=33532

    Fundamental Solution to Pell's Equation X^2-1002Y^2=1 was:
    -------------------------------------------------------
    X=206869247
    Y=6535248

    Fundamental Solution to Pell's Equation X^2-1003Y^2=1 was:
    -------------------------------------------------------
    X=9026
    Y=285

    Fundamental Solution to Pell's Equation X^2-1004Y^2=1 was:
    -------------------------------------------------------
    X=27009633024199
    Y=852416459730

    Fundamental Solution to Pell's Equation X^2-1005Y^2=1 was:
    -------------------------------------------------------
    X=2950149761
    Y=93059568

    Fundamental Solution to Pell's Equation X^2-1006Y^2=1 was:
    -------------------------------------------------------
    X=14125267563780214605455
    Y=445346140255574921748

    Fundamental Solution to Pell's Equation X^2-1007Y^2=1 was:
    -------------------------------------------------------
    X=476
    Y=15

    Fundamental Solution to Pell's Equation X^2-1008Y^2=1 was:
    -------------------------------------------------------
    X=127
    Y=4

    Fundamental Solution to Pell's Equation X^2-1009Y^2=1 was:
    -------------------------------------------------------
    X=583201
    Y=18360

    Fundamental Solution to Pell's Equation X^2-1010Y^2=1 was:
    -------------------------------------------------------
    X=3395619
    Y=106846

    Fundamental Solution to Pell's Equation X^2-1011Y^2=1 was:
    -------------------------------------------------------
    X=8426
    Y=265

    Fundamental Solution to Pell's Equation X^2-1012Y^2=1 was:
    -------------------------------------------------------
    X=3222617399
    Y=101302110

    Fundamental Solution to Pell's Equation X^2-1013Y^2=1 was:
    -------------------------------------------------------
    X=309159979019115849
    Y=9713562669309460

    Fundamental Solution to Pell's Equation X^2-1014Y^2=1 was:
    -------------------------------------------------------
    X=4656965
    Y=146246

    Fundamental Solution to Pell's Equation X^2-1015Y^2=1 was:
    -------------------------------------------------------
    X=352871
    Y=11076

    Fundamental Solution to Pell's Equation X^2-1016Y^2=1 was:
    -------------------------------------------------------
    X=255
    Y=8

    Fundamental Solution to Pell's Equation X^2-1017Y^2=1 was:
    -------------------------------------------------------
    X=2900932297217
    Y=90965584992

    Fundamental Solution to Pell's Equation X^2-1018Y^2=1 was:
    -------------------------------------------------------
    X=15155578752298003
    Y=475005498176334

    Fundamental Solution to Pell's Equation X^2-1019Y^2=1 was:
    -------------------------------------------------------
    X=6089923321730
    Y=190776436539

    Fundamental Solution to Pell's Equation X^2-1020Y^2=1 was:
    -------------------------------------------------------
    X=511
    Y=16

    Fundamental Solution to Pell's Equation X^2-1021Y^2=1 was:
    -------------------------------------------------------
    X=198723867690977573219668252231077415636351801801
    Y=6219237759214762827187409503019432615976684540

    Fundamental Solution to Pell's Equation X^2-1022Y^2=1 was:
    -------------------------------------------------------
    X=1023
    Y=32

    Fundamental Solution to Pell's Equation X^2-1023Y^2=1 was:
    -------------------------------------------------------
    X=32
    Y=1

    No Fundamental Solution was found to Pell's Equation X^2-1024Y^2=1.

  • 相关阅读:
    GPU 加速NLP任务(Theano+CUDA)
    SOJ 1717 Computer (单机任务调度)
    CNN for NLP (CS224D)
    数据分析:中国高校更名历史 Python
    TextRank 自动文摘
    深度学习笔记(十一)网络 Inception, Xception, MobileNet, ShuffeNet, ResNeXt, SqueezeNet, EfficientNet, MixConv
    深度学习笔记(七)SSD 论文阅读笔记简化
    在Windows下编译扩展OpenCV 3.1.0 + opencv_contrib 及一些问题
    win10 + gtx1060 + cuda8.0 + caffe + vs2013 + Tensorflow + PyTorch
    深度学习笔记(二十五)DenseBox & FCOS & PolarMask
  • 原文地址:https://www.cnblogs.com/fengju/p/6336199.html
Copyright © 2011-2022 走看看