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

%I #31 Mar 31 2019 02:18:46

%S 1,2,7,3,78,4,51,732,277,191,6,44,20621,122,416941,8,5123,25,1034,9,

%T 3993882,210107,203100,10,1325,5248,65030839,20107956,30953,

%U 4584105462,1036,4889,295081,58746,20725,98465863939,1494439626,1612,10173,6040149252,102607,9460742124

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

%C a(n) exists for all n.

%C X = 4*a(n)^2 - (-1)^((p+1)/4), Y = 2*a(n)*A306619(n) gives the smallest solution to x^2 - 2p*y^2 = 1, p = A002145(n).

%F If the continued fraction of sqrt(2*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/2 and A306619(n) = y.

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

%e n | Equation | x_min | y_min

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

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

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

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

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

%e 6 | 2*x^2 - 31*y^2 = +1 | 4 | 1

%e 7 | 2*x^2 - 43*y^2 = -1 | 51 | 11

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

%e 9 | 2*x^2 - 59*y^2 = -1 | 277 | 51

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

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

%Y Cf. A002145, A306619 (y-values).

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

%K nonn

%O 1,2

%A _Jianing Song_, Mar 25 2019