OFFSET
1,1
COMMENTS
a(4) = 0 as when k+1 is a square, 4k+4 is also a square; hence 4k+1 cannot be a square for k > 0.
LINKS
David Wasserman, Table of n, a(n) for n = 1..100
FORMULA
a(i^2-1) is usually (i-1)^2-1. For 2 < i < 1000 there are 34 exceptions. The first four of these are a(11^2-1) = 3, a(23^2-1) = 8, a(39^2-1) = 15 and a(41^2-1) = 3. - David Wasserman, May 03 2007
EXAMPLE
a(5) = 3 as 3 + 1 = 4 and 3*5 + 1 = 16 both are squares.
MATHEMATICA
r[n_, c_] := Reduce[i>1 && j>1 && k+1 == i^2 && n*k+1 == j^2, {i, j, k}, Integers] /. C[1] -> c // Simplify;
a[n_] := If[rn = r[n, 0] || r[n, 1] || r[n, 2]; rn === False, 0, k /. Solve[rn] // Min];
Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 100}] (* Jean-François Alcover, May 12 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jun 08 2003
EXTENSIONS
More terms from Donald Sampson (marsquo(AT)hotmail.com), Dec 04 2003
Corrected by David Wasserman, May 03 2007
STATUS
approved