Guest User

Untitled

a guest
Mar 25th, 2019
50
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. AbsoluteTiming[
  2. Parallelize[
  3. f[n_] := n (3 n - 1)/2;
  4. g[{i_, j_}] := IntegerQ[(1 + Sqrt[1 + 24 (f[i] + f[j])])/6] &&
  5. IntegerQ[(1 + Sqrt[1 + 24 (-f[i] + f[j])])/6];
  6. Select[Flatten[Table[{i, j}, {i, 1, 2000}, {j, i + 1, 3000}], 1],
  7. g]]]
RAW Paste Data