Advertisement
JoelSjogren

Untitled

Nov 22nd, 2020
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. box% sage
  2. ┌────────────────────────────────────────────────────────────────────┐
  3. │ SageMath version 9.2, Release Date: 2020-10-24 │
  4. │ Using Python 3.8.6. Type "help()" for help. │
  5. └────────────────────────────────────────────────────────────────────┘
  6. sage: p = 17
  7. sage: f = lambda x: (x^2 + 5) % p
  8. sage: F = lambda S: {f(x) for x in S}
  9. sage: {i for i in range(p)}
  10. {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}
  11. sage: F(_)
  12. {1, 3, 4, 5, 6, 7, 9, 13, 14}
  13. sage: F(_)
  14. {1, 3, 4, 6, 7, 13, 14}
  15. sage: F(_)
  16. {3, 4, 6, 7, 14}
  17. sage: F(_)
  18. {3, 4, 7, 14}
  19. sage: F(_)
  20. {3, 4, 14}
  21. sage: F(_)
  22. {4, 14}
  23. sage: F(_)
  24. {4, 14}
  25. sage:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement