A130226 Smallest integer x satisfying the Pell equation x^2-k*y^2=-1 for the values of k given in A031396.
0, 1, 2, 3, 18, 4, 5, 70, 6, 32, 7, 182, 99, 29718, 8, 1068, 43, 9, 378, 500, 5604, 10, 4005, 8890182, 776, 11, 682, 57, 1744, 12, 113582, 4832118, 13, 1118, 1111225770, 68, 1764132, 14, 3141, 251, 15, 1710, 23156, 71011068, 4443, 16, 6072, 82, 1407
Offset: 1
Keywords
Examples
a(5)=18 because A031396(5)=13, and the solution to x^2-13y^2=-1 with smallest possible x has x=18.
Links
- Ray Chandler, Table of n, a(n) for n = 1..10000
- K. Lakshmi and R. Someshwari, On The Negative Pell Equation y^2 = 72x^2 - 23, International Journal of Emerging Technologies in Engineering Research (IJETER), Volume 4, Issue 7, July (2016).
- R. Suganya and D. Maheswari, On the Negative Pellian Equation y^2 = 110 * x^2 - 29, Journal of Mathematics and Informatics, Vol. 11 (2017), pp. 63-71.
- S. Vidhyalakshmi, V. Krithika, and K. Agalya, On The Negative Pell Equation y^2 = 72x^2 - 8, International Journal of Emerging Technologies in Engineering Research (IJETER) Volume 4, Issue 2, February (2016).
Crossrefs
Cf. A094048.
Programs
-
Maple
A130226 := proc(m) local xm,x ,i,xmo,y2; xm := [] ; # x^2-m*y^2=-1 (mod m) requires x in xm[] for x from 0 to m-1 do if modp(x^2,m) = modp(-1,m) then xm := [op(xm),x] ; end if; end do: for i from 0 do for xmo in xm do x := i*m+xmo ; y2 := (x^2+1)/m ; if issqr(y2) then return x ; end if; end do: end do: end proc: L := BFILETOLIST("b031396.txt") ; n := 1: for m in L do printf("%d %d\n",n,A130226(m)) ; n := n+1 ; end do: # R. J. Mathar, Oct 19 2014
-
Mathematica
terms = 1000; a031396 = Cases[Import["https://oeis.org/A031396/b031396.txt", "Table"], {, }][[;; terms, 2]]; sol[n_] := Solve[x > 0 && y > 0 && x^2 - n y^2 == -1, {x, y}, Integers]; a[1] = 0; a[n_] := a[n] = x /. sol[a031396[[n]]] /. C[1] -> 0 // First // Simplify // Quiet; Table[Print[n, " ", a031396[[n]], " ", a[n]]; a[n], {n, 1, terms}] (* Jean-François Alcover, Apr 05 2020 *)