A081231 Let p = n-th prime of the form 4k+3, take smallest solution (x,y) to the Pellian equation x^2 - p*y^2 = 1 with x and y >= 1; sequence gives value of x.
2, 8, 10, 170, 24, 1520, 3482, 48, 530, 48842, 3480, 80, 82, 227528, 962, 4730624, 10610, 77563250, 1728148040, 64080026, 168, 4190210, 8994000, 16266196520, 278354373650, 224, 226, 6195120, 3674890, 139128, 115974983600, 138274082
Offset: 1
Examples
For n=3, p = 11, x=10, y=3 since we have 10^2 = 11*3^2 + 1, so a(3) = 10.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
PellSolve[(m_Integer)?Positive] := Module[{cf, n, s}, cf = ContinuedFraction[ Sqrt[m]]; n = Length[ Last[cf]]; If[ OddQ[n], n = 2*n]; s = FromContinuedFraction[ ContinuedFraction[ Sqrt[m], n]]; {Numerator[s], Denominator[s]}]; Transpose[ PellSolve /@ Select[ Prime[ Range[72]], Mod[ #, 4] == 3 &]][[1]] (* Robert G. Wilson v, Sep 02 2004 *)
Extensions
More terms from Robert G. Wilson v, Sep 02 2004