%I #24 Sep 03 2018 23:00:42
%S 2,0,1,2,0,0,2,0,1,2,1,0,0,0,0,1,2,0,0,2,0,0,1,2,0,0,2,0,0,1,2,0,0,2,
%T 0,0,1,2,1,0,0,0,0,1,2,0,0,0,2,0,1,2,1,0,0,2,0,0,1,0,0,0
%N Number of classes of proper solutions of the Pell equation x^2 - D(n) y^2 = +4 for D(n) = A079896(n), n >= 0.
%C See the W. Lang link on A225953, Table 2. References will also be found there. For the present class number see especially Theorem 109 pp. 207-208 of the Nagell reference.
%C These class numbers should not be confused with the class numbers of indefinite binary quadratic forms of discriminant D(n), which are given in A087048(n).
%C If a(n) = 2 then the proper positive fundamental solution for the second class [x2(n), y2(n)] is obtained from the solution of the first class [x1(n), y1(n)] (shown in the mentioned Table 2 under Pell(X, Y)) by application of the matrix M(n) = [[x0(n), D(n)*y0(n)], [y0(n), x0(n)]] on (x1(n), -y1(n))^T (T for transposed), where x0(n) and y0(n) is the positive (proper) fundamental solution of x^2 - D(n)*y^2 = +1 found under A033313 and A033317 for the appropriate D from A000037. Application of positive powers of M(n) to the proper positive fundamental solution of each class produces all positive solutions.
%C If a(n) = 1 the class is called ambiguous (see Nagell, p. 205). In this case the proper positive fundamental solution [x1(n), y1(n)] = [x(n), y(n)] and the negative one [x1(n), -y1(n)] belong to the same class.
%C For every D(n) = A079896(n) there is the improper positive fundamental solution [2*x0(n), 2*y0(n)].
%C Conjecture: For even D(n), i.e., D from 4*A000037, and a(n) = 0 one finds for r(n) = D(n)/4 coincidence with Conway's so-called rectangular numbers A007969. The first D values are 8, 20, 24, 40, 48, 52, 56, 68, 72, 80, ... This is equivalent to the conjecture that X^2 - r*y^2 = +1 has an even fundamental positive solution y = y0 precisely for the numbers A007969 (because x has to be even, x = 2*X, and whenever y0 is even all y solutions are even). See A261250 and A262024 for the y0 and x0 values, respectively.
%D Nagell, T. Introduction to number theory, Chelsea Publishing Company, 1964, page 52.
%e n=0: D(0) = 5 = A000037(3) with the a(0) = 2 proper positive fundamental solutions [x, y] = [3, 1] and [7, 3] for the two classes.
%e [x0(0), y0(0)] = [A033313(3), A033317(3)] = [9, 4], and (7, 3)^T = [[9, 4*5], [4, 9]] (3, -1)^T.
%e All other positive solutions in each of the two classes are obtained by applying positive powers of this matrix M(5) to the fundamental solutions.
%e The improper positive fundamental solution is [2*9, 2*4] = [18, 8].
%e n=1: D(1) = 8 = A000037(6) has a(1) = 0, hence there are only the improper solutions obtainable from [2*3, 2*1] = [6, 2], the smallest positive one. For this even D one has, with x = 2*X, X^2 - 8/4 y^2 = +1, which has an even positive fundamental solution y0 = 2, and r(1) = D(1)/4 = 2 is A007969(1).
%Y Cf. A079896, A225953, A087048, A033313, A033317, A261250, A262024.
%K nonn
%O 0,1
%A _Wolfdieter Lang_, Sep 16 2015