login
a(n) is the norm of the fundamental unit of binary quadratic forms with discriminant D = A079896(n).
0

%I #27 Mar 31 2019 02:22:34

%S -1,-1,1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,-1,1,1,1,-1,-1,1,1,1,-1,-1,-1,1,

%T 1,-1,1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1,1,1,-1,1,-1,-1,1,1,1,-1,1,1,1,1,

%U 1,-1,1,1,-1,-1,-1,1,1,1,-1,1,1,-1,1,1,1,-1,1,1,1,-1,1,-1,1,1,1,-1,-1,-1

%N a(n) is the norm of the fundamental unit of binary quadratic forms with discriminant D = A079896(n).

%C The fundamental unit of binary quadratic forms with discriminant D is the number (x_1 + (y_1)*sqrt(D))/2, where (x_1,y_1) is the smallest solution to x^2 - D*y^2 = +-4. Each term is either -1 or 1 depending on whether (x_1)^2 - D*(y_1)^2 = -4 or 4.

%C All solutions to x^2 - D*y^2 = +-4 are given by the identity (x_n + (y_n)*sqrt(D))/2 = ((x_1 + (y_1)*sqrt(D))/2)^n.

%C The discriminants D corresponding to (x_1)^2 - D*(y_1)^2 = -4 are listed in A226696.

%D D. A. Buell, Binary Quadratic Forms, Springer, 1989, Sections 3.2 and 3.3, pp. 31-48.

%F a(n) = -1 if D = A079896(n) is in A226696, otherwise 1.

%e Fundamental units and their norms for the first 15 discriminants in the form (X + Y*sqrt(D))/2 (N = (X^2 - D*Y^2)/4 are the corresponding norms) are:

%e D | X | Y | N

%e 5 | 1 | 1 | -1

%e 8 | 2 | 1 | -1

%e 12 | 4 | 1 | 1

%e 13 | 3 | 1 | -1

%e 17 | 8 | 2 | -1

%e 20 | 4 | 1 | -1

%e 21 | 5 | 1 | 1

%e 24 | 10 | 2 | 1

%e 28 | 16 | 3 | 1

%e 29 | 5 | 1 | -1

%e 32 | 6 | 1 | 1

%e 33 | 46 | 8 | 1

%e 37 | 12 | 2 | -1

%e 40 | 6 | 1 | -1

%e 41 | 64 | 10 | -1

%o (PARI) b(D) = for(n=1, oo, if(issquare(D*n^2-4), return(-1)); if(issquare(D*n^2+4), return(1)))

%o for(n=2, 200, if(n%4 <= 1 && !issquare(n), print1(b(n), ", ")))

%o (Julia) using Nemo

%o function b(D)

%o for j in 1:10000

%o issquare(D*j^2 - 4) && return -1

%o issquare(D*j^2 + 4) && return 1

%o end

%o 0 end

%o F = findall(n -> ZZ(n) % 4 <= 1 && !issquare(ZZ(n)), 1:100)

%o map(n -> b(ZZ(n)), F) |> println # _Peter Luschny_, Mar 08 2019

%Y Cf. A079896, A226696.

%Y A014077 is a subsequence listing the corresponding values for only fundamental discriminants (A003658).

%K sign

%O 0,1

%A _Jianing Song_, Mar 02 2019