OFFSET
1,1
COMMENTS
EXAMPLE
For n = 2, tri(n) = 3 and the first k is 5 because tri(5) = 15 and 3*15 = 45 is triangular.
MATHEMATICA
kMax = 10^6; TriangularQ[n_] := IntegerQ[Sqrt[1 + 8*n]]; Table[t = n*(n+1)/2; k = 2; While[t2 = k*(k+1)/2; k < kMax && ! TriangularQ[t*t2], k++]; If[k == kMax, 0, k], {n, 65}]
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, May 31 2012
STATUS
approved