OFFSET
1,1
COMMENTS
No term > 4 in this sequence is an even square (see formula in A130280).
A001248(k) is a term for any k. - Jinyuan Wang, Apr 14 2019
EXAMPLE
a(1)=4 since 1(2^2-1)+1=2^2, 2(5^2-1)+1=7^2, 3(3^2-1)+1=5^2 but 4(m^2-1)+1 = 4m^2-3 can't be a square because the largest square < 4m^2 is (2m-1)^2 = 4m^2-4m+1 < 4m^2-3 for m>1.
a(2)=9 since for n=5,6,7,8 one has m=2,3,5,2, but 9(m^2-1)+1 = 9m^2-8 > 9m^2-11 >= 9m^2-6m+1 = (3m-1)^2 and therefore can't be a square.
MATHEMATICA
$MaxExtraPrecision = 200;
r[n_, c_] := Reduce[k > 1 && j > 1 && n*(k^2 - 1) + 1 == j^2, {j, k}, Integers] /. C[1] -> c // Simplify;
A130280[n_] := If[rn = r[n, 0] || r[n, 1] || r[n, 2]; rn === False, 0, k /. {ToRules[rn]} // Min];
Reap[For[n=1, n <= 2000, n++, If[A130280[n]==0, Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, May 12 2017 *)
PROG
(PARI) f(n) = for(k=2, n+1, if( issquare(n*(k^2-1)+1), return(k)))
is(n) = issquare(n) && f(n) == 0; \\ Jinyuan Wang, Apr 14 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, May 24 2007
EXTENSIONS
More terms from Jean-François Alcover, May 12 2017
More terms from Jinyuan Wang, Apr 14 2019
STATUS
approved