OFFSET
1,2
COMMENTS
EXAMPLE
24 is a term because A179682(24) = 242: 24 < 242 < 4*24*25 and 24*25*242*243 = 5940^2.
MAPLE
A179682:= proc(n) local F, t, p, k0, d, k, a, j;
p:= max(map(t -> `if`(t[2]::odd, t[1], NULL), [op(ifactors(n)[2]), op(ifactors(n+1)[2])]));
if n mod p = 0 then k0:= n+p-1; d:= 1;
else k0:= n+1; d:= p-1;
fi;
t:= n*(n+1)/4;
for a from k0 by p do
for k in [a, a+d] do
if issqr(k*(k+1)*t) then return k fi
od od
end proc:
f(0):= 1:
select(t -> A179682(t) <> 4*t*(t+1), [$0..11000]);
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Feb 15 2019
STATUS
approved