A172000 Nonsquare positive integers n such that the fundamental unit of quadratic field Q(sqrt(n)) has norm -1.
2, 5, 8, 10, 13, 17, 18, 20, 26, 29, 32, 37, 40, 41, 45, 50, 52, 53, 58, 61, 65, 68, 72, 73, 74, 80, 82, 85, 89, 90, 97, 98, 101, 104, 106, 109, 113, 116, 117, 122, 125, 128, 130, 137, 145, 148, 149, 153, 157, 160, 162, 164, 170, 173, 180, 181, 185, 193, 197, 200
Offset: 1
Keywords
Programs
-
Mathematica
cr = {}; Do[If[IntegerQ[Sqrt[n]], , kk = NumberFieldFundamentalUnits[Sqrt[n]]; d1 = kk[[1]][[2]][[1]]; d2 = kk[[1]][[1]] kk[[1]][[2]][[2]]; d3 = Expand[(d1 + d2) (d1 - d2)]; If[d3 == -1, AppendTo[cr, n]]], {n, 2, 1000}]; cr (* Artur Jasinski, Oct 10 2011 *)
-
PARI
{ for(n=1,1000, if(issquare(n),next); if( norm(bnfinit(x^2-n).fu[1])==-1, print1(n,", ")) ) }
Formula
Extensions
Edited by Max Alekseyev, Mar 09 2010
Comments