OFFSET
0,2
COMMENTS
Triangular(k) = A000217(k) = k*(k+1)/2.
For n>1, a(n) <= n-1, because with k=n-1: triangular(n) + triangular(k) = n*(n+1)/2 + (n-1)*n/2 = n^2.
MATHEMATICA
Table[k = 1; tri = n*(n + 1)/2; While[k <= n+2 && ! IntegerQ[Sqrt[tri + k*(k + 1)/2]], k++]; k, {n, 0, 100}] (* T. D. Noe, Nov 21 2013 *)
PROG
(Python)
import math
for n in range(77):
tn = n*(n+1)//2
for k in range(1, n+9):
sum = tn + k*(k+1)//2
r = int(math.sqrt(sum))
if r*r == sum:
print(str(k), end=', ')
break
CROSSREFS
Cf. A082183 (least k>0 such that triangular(n) + triangular(k) is a triangular number).
Cf. A212614 (least k>1 such that triangular(n) * triangular(k) is a triangular number).
Cf. A232176 (least k>0 such that n^2 + triangular(k) is a square).
Cf. A232179 (least k>=0 such that n^2 + triangular(k) is a triangular number).
Cf. A101157 (least k>0 such that triangular(n) + k^2 is a triangular number).
Cf. A232178 (least k>=0 such that triangular(n) + k^2 is a square).
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Nov 20 2013
STATUS
approved