login
A229133
Numbers k such that the distance between the k-th triangular number and the nearest square is a square.
1
1, 2, 4, 5, 6, 8, 9, 13, 15, 17, 25, 32, 39, 49, 52, 54, 56, 63, 64, 80, 87, 89, 90, 95, 98, 100, 104, 111, 128, 135, 144, 148, 152, 153, 159, 176, 183, 189, 200, 207, 224, 225, 230, 231, 233, 248, 255, 272, 279, 285, 288, 296, 303, 305, 319, 320, 327, 329, 344, 351, 368, 369, 370, 374, 375
OFFSET
1,2
COMMENTS
A229118(a(n)) is a perfect square.
EXAMPLE
The nearest square to 6*7/2=21 is 25 and |21-25| = 2^2 so 6 is in the sequence.
The nearest square to 7*8/2=28 is 25 and |28-25| = 3 so 7 is not in the sequence.
MATHEMATICA
tnsQ[n_]:=Module[{tno=(n(n+1))/2, sr, a, b}, sr=Sqrt[tno]; a=tno-Floor[sr]^2; b=Ceiling[sr]^2-tno; IntegerQ[Sqrt[Min[{a, b}]]]]; Select[Range[400], tnsQ] (* Harvey P. Dale, Mar 26 2015 *)
CROSSREFS
Sequence in context: A333222 A030326 A080086 * A015844 A114318 A169956
KEYWORD
nonn
AUTHOR
Ralf Stephan, Sep 15 2013
STATUS
approved