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”).
%I #41 Mar 31 2019 02:18:22
%S 1,3,3,13,5,39,59,7,23,221,59,9,9,477,31,2175,103,8807,41571,8005,13,
%T 2047,2999,127539,527593,15,15,2489,1917,373,340551,11759,9409,4109,
%U 52778687,801,19,137913,113759383,137,16437,12311,21,21,15732537,1275,1729,7204587,305987,67
%N x-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 = a(n)^2 - (-1)^((p+1)/4), Y = a(n)*A306566(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) = (a(n) + A306566(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 a(n) = x and A306566(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, x=1; while(!issquare((x^2 - 2*(-1)^((p+1)/4))/p), x++); x)
%o forprime(p=3, 500, if(p%4==3, print1(b(p), ", ")))
%Y Cf. A002145, A306566 (y-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,2
%A _Jianing Song_, Mar 25 2019