OFFSET
1,2
REFERENCES
C. Stanley Ogilvy, Tomorrow's Math, 1972, p. 119.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1990
EXAMPLE
For n=3, p = 11, x=10, y=3 since we have 10^2 = 11*3^2 + 1, so a(3) = 3.
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 &]][[2]] (* Robert G. Wilson v, Sep 02 2004 *)
PROG
(PARI) p4xp3(n, m) = { forstep(p=3, m, 4, for(y=1, n, if(isprime(p), x=y*y*p+1; if(issquare(x), print1(y" "); break; ) ) ) ) }
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Apr 14 2003
EXTENSIONS
More terms from Robert G. Wilson v, Apr 15 2003; recomputed Sep 03 2004
STATUS
approved