OFFSET
1,1
COMMENTS
All terms > 4 in A130283 are odd squares, but not all odd squares are in that sequence: This sequence here gives the exceptions as (2a(n)+1)^2. The sequence consists mainly of the subsequences: (1) A056220(k) = 2k^2-1 with k>1: {7,17,31,49,...}, for which m=k gives (1+2*A056220(k))^2(k^2-1)+1 = k^2(4k^2-3)^2; (2) 2*A079414(k) = 2k^2(4k^2-3) with k>1: {104,594,1952,4850,...}, for which m=k gives (1+4*A079414(k))^2(k^2-1)+1 = k^2(16k^4-20k^2+5)^2. A third subsequence starts {1455,20195,...}; up to 20195, all terms are in one of these subsequences.
FORMULA
EXAMPLE
MATHEMATICA
r[n_] := Reduce[m>1 && k>1 && (2n+1)^2*(m^2-1)+1 == k^2, {m, k}, Integers];
Reap[For[n=1, n <= 5000, n++, If[r[n] =!= False, Print[n]; Sow[n]]]][[2, 1]] (* Jean-François Alcover, May 12 2017 *)
PROG
(PARI) A130284( LIM=9999, START=1 )={ local(N); for( n=START, LIM, N=(2*n+1)^2; for( m=2, sqrtint(n>>1+1), if(!issquare( N*(m^2-1)+1 ), next); print1(n", "); next(2))) }
(PARI) {Q(k, x=x)=if(m>0, (4*x^2-2)*Q(k-1, x)-Q(k-2, x), 1)} {P(k, x=x)=if(type(x=(x^2*Q(k, x)^2-1)/(x^2-1))!="t_POL", sqrtint(x)\2, ((-1)^k*Pol(sqrt(x))-1)/2)}
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, May 24 2007, May 29 2007
STATUS
approved