SHARE
TWEET

Untitled

a guest Mar 25th, 2019 48 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top