MatsGranvik

Number theoretic analogue of the identity matrix by permuting upper summation indexes.

Aug 22nd, 2023
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. (*start*)
  2. (*Mathematica*)
  3. Clear[t];
  4. nn = 15;
  5. mm = 15;
  6. t[1, 1] = 1;
  7. t[n_, k_] :=
  8. t[n, k] =
  9. If[n < k,
  10. If[And[n > 1, k > 1],
  11. Sum[t[k - i, n - 1] - t[k - i, n], {i, 1, k - 1}], 0],
  12. If[And[n > 1, k > 1],
  13. Sum[t[n - i, k - 1] - t[n - i, k], {i, 1, n - 1}], 0]];
  14. TableForm[Table[Table[t[n, k], {k, 1, mm}], {n, 1, nn}]]
  15.  
  16. Clear[t];
  17. nn = 15;
  18. mm = 15;
  19. t[1, 1] = 1;
  20. t[n_, k_] :=
  21. t[n, k] =
  22. If[n < k,
  23. If[And[n > 1, k > 1],
  24. Sum[t[k - i, n - 1] - t[k - i, n], {i, 1, n - 1}], 0],
  25. If[And[n > 1, k > 1],
  26. Sum[t[n - i, k - 1] - t[n - i, k], {i, 1, k - 1}], 0]];
  27. TableForm[Table[Table[t[n, k], {k, 1, mm}], {n, 1, nn}]]
  28. (*end*)
Advertisement
Add Comment
Please, Sign In to add comment