OFFSET
1,2
MATHEMATICA
f[n_] := Block[{k = 1}, While[ GCD[n(n + 1)/2, (n + k)(n + k + 1)/2] != 1, k++ ]; k]; t = Table[0, {1000}]; Do[a = f@n; If[a < 1001 && t[[a]] == 0, t[[a]] = n; Print[{a, n}], If[a > 1000, Print[{"Over 1000", n}]]], {n, 2^31 - 1}] (* Robert G. Wilson v, Jun 03 2007 *)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Reinhard Zumkeller, May 28 2007
EXTENSIONS
a(13)-a(16) from Robert G. Wilson v, Jun 03 2007
a(17) from Chai Wah Wu, Sep 16 2021
a(18) from Chai Wah Wu, Sep 23 2021
STATUS
approved