OFFSET
1,1
REFERENCES
C. Stanley Ogilvy, Tomorrow's Math, 1972, p. 119.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..2000
N. J. A. Sloane et al., Binary Quadratic Forms and OEIS (Index to related sequences, programs, references)
EXAMPLE
For n = 1, p = 5, x=9, y=4 since 9^2 = 5*4^2 + 1, so a(1) = 4.
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]}]; t = {}; Last /@ PellSolve /@ Select[Prime@Range@54, Mod[ #, 4] == 1 &] (* Robert G. Wilson v, Feb 28 2006 *)
PROG
(PARI) p4xp1(n, m) = { forstep(p=1, 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, Feb 28 2006
STATUS
approved