login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

y-value of the smallest solution to x^2 - p*y^2 = 2*(-1)^((p+1)/4), p = A002145(n).
3

%I #34 Mar 31 2019 02:18:36

%S 1,1,1,3,1,7,9,1,3,27,7,1,1,47,3,193,9,747,3383,627,1,153,217,9041,

%T 36321,1,1,161,121,23,20687,699,537,233,2900979,43,1,7199,5843427,7,

%U 803,593,1,1,731153,59,79,326471,13809,3,7,12507,541137,11,563210019

%N y-value of the smallest solution to x^2 - p*y^2 = 2*(-1)^((p+1)/4), p = A002145(n).

%C a(n) exists for all n.

%C X = A306529(n)^2 - (-1)^((p+1)/4), Y = A306529(n)*a(n) gives the smallest solution to x^2 - p*y^2 = 1, p = A002145(n). As a result, all the positive solutions to x^2 - p*y^2 = 2*(-1)^((p+1)/4) are given by (x_n, y_n) where x_n + (y_n)*sqrt(p) = (A306529(n) + a(n)*sqrt(p))*(X + Y*sqrt(p))^n.

%F If the continued fraction of sqrt(A002145(n)) is [a_0; {a_1, a_2, ..., a_(k-1), a_k, a_(k-1), ..., a_1, 2*a_0}], where {} is the periodic part, let x/y = [a_0; a_1, a_2, ..., a_(k-1)], gcd(x, y) = 1, then A306529(n) = x and a(n) = y.

%e The smallest solution to x^2 - p*y^2 = 2*(-1)^((p+1)/4) for the first primes congruent to 3 modulo 4:

%e n | Equation | x_min | y_min

%e 1 | x^2 - 3*y^2 = -2 | 1 | 1

%e 2 | x^2 - 7*y^2 = +2 | 3 | 1

%e 3 | x^2 - 11*y^2 = -2 | 3 | 1

%e 4 | x^2 - 19*y^2 = -2 | 13 | 3

%e 5 | x^2 - 23*y^2 = +2 | 5 | 1

%e 6 | x^2 - 31*y^2 = +2 | 39 | 7

%e 7 | x^2 - 43*y^2 = -2 | 59 | 9

%e 8 | x^2 - 47*y^2 = +2 | 7 | 1

%e 9 | x^2 - 59*y^2 = -2 | 23 | 3

%o (PARI) b(p) = if(isprime(p)&&p%4==3, y=1; while(!issquare(p*y^2 + 2*(-1)^((p+1)/4)), y++); y)

%o forprime(p=3, 500, if(p%4==3, print1(b(p), ", ")))

%Y Cf. A002145, A306529 (x-values).

%Y Similar sequences: A094048, A094049 (x^2 - A002144(n)*y^2 = -1); A306618, A306619 (2*x^2 - A002145(n)*y^2 = (-1)^((p+1)/4))).

%K nonn

%O 1,4

%A _Jianing Song_, Mar 25 2019