Polynomial Magic Trick: Exploring Function Patterns with Mod and Input Boxes

Polynomial Magic Trick: Exploring Function Patterns with Mod and Input Boxes
Loading the math board and drawing, please wait…
2019-05-09 06:54
This interactive GeoGebra example presents a 'magic trick' that reveals hidden patterns in polynomial functions using modular arithmetic. The core mathematical concepts involve polynomial functions, the modulo operation (Mod), function iteration, and algebraic reasoning. The construction utilizes Textfield and InputBox objects for user input, along with If and Mod commands to control the computational flow, while creating numerous objects (A2-A19, B1-B11, etc.) to store intermediate results and display steps. This resource is ideal for high school or early college students to explore periodicity in polynomial expressions under modular arithmetic, understand function composition, and appreciate how interactive design can make abstract algebra concepts engaging. It serves both as a classroom demonstration and as a self-guided exploration tool for discovering mathematical regularities.

GeoGebra Commands & Parameters

  1. Textfield(B1) → InputBox1
  2. Textfield(B2) → InputBox2
  3. Mod(B2, $B$1) → C2
  4. Mod(B3, $B$1) → C3
  5. Mod(B4, $B$1) → C4
  6. Mod(B5, $B$1) → C5
  7. Mod(B6, $B$1) → C6
  8. Mod(B7, $B$1) → C7
  9. Mod(B8, $B$1) → C8
  10. Mod(B9, $B$1) → C9
  11. Mod(B10, $B$1) → C10
  12. Mod(B11, $B$1) → C11
  13. Mod(B12, $B$1) → C12
  14. Mod(B13, $B$1) → C13
  15. If((2 * C2) > $B$1, C2 - $B$1, C2) → D2
  16. If((2 * C3) > $B$1, C3 - $B$1, C3) → D3
  17. If((2 * C4) > $B$1, C4 - $B$1, C4) → D4
  18. If((2 * C5) > $B$1, C5 - $B$1, C5) → D5
  19. If((2 * C6) > $B$1, C6 - $B$1, C6) → D6
  20. If((2 * C7) > $B$1, C7 - $B$1, C7) → D7
  21. If((2 * C8) > $B$1, C8 - $B$1, C8) → D8
  22. If((2 * C9) > $B$1, C9 - $B$1, C9) → D9
  23. If((2 * C10) > $B$1, C10 - $B$1, C10) → D10
  24. If((2 * C11) > $B$1, C11 - $B$1, C11) → D11
  25. If((2 * C12) > $B$1, C12 - $B$1, C12) → D12
  26. If((2 * C13) > $B$1, C13 - $B$1, C13) → D13
  27. Mod(B14, $B$1) → C14
  28. If((2 * C14) > $B$1, C14 - $B$1, C14) → D14
  29. Mod(B15, $B$1) → C15
  30. If((2 * C15) > $B$1, C15 - $B$1, C15) → D15
  31. Mod(B16, $B$1) → C16
  32. If((2 * C16) > $B$1, C16 - $B$1, C16) → D16
  33. Mod(B17, $B$1) → C17
  34. If((2 * C17) > $B$1, C17 - $B$1, C17) → D17
  35. Mod(B18, $B$1) → C18
  36. If((2 * C18) > $B$1, C18 - $B$1, C18) → D18
  37. Mod(B19, $B$1) → C19
  38. If((2 * C19) > $B$1, C19 - $B$1, C19) → D19
  39. If(D3 ≟ 0, 0, (D3 * E3(x))) → F3
  40. If(D4 ≟ 0, 0, (D4 * E4(x))) → F4
  41. If(D5 ≟ 0, 0, (D5 * E5(x))) → F5
  42. If(D6 ≟ 0, 0, (D6 * E6(x))) → F6
  43. If(D7 ≟ 0, 0, (D7 * E7(x))) → F7
  44. If(D8 ≟ 0, 0, (D8 * E8(x))) → F8
  45. If(D9 ≟ 0, 0, (D9 * E9(x))) → F9
  46. If(D10 ≟ 0, 0, (D10 * E10(x))) → F10
  47. If(D11 ≟ 0, 0, (D11 * E11(x))) → F11
  48. If(D12 ≟ 0, 0, (D12 * E12(x))) → F12
  49. If(D13 ≟ 0, 0, (D13 * E13(x))) → F13
  50. If(D14 ≟ 0, 0, (D14 * E14(x))) → F14
  51. If(D15 ≟ 0, 0, (D15 * E15(x))) → F15
  52. If(D16 ≟ 0, 0, (D16 * E16(x))) → F16
  53. If(D17 ≟ 0, 0, (D17 * E17(x))) → F17
  54. If(D18 ≟ 0, 0, (D18 * E18(x))) → F18
  55. If(D19 ≟ 0, 0, (D19 * E19(x))) → F19

AI Drawing Prompt Reference

Create an interactive math exploration layout with two input boxes for entering an integer modulus and a polynomial expression. Below, display a series of rows showing the polynomial evaluated at consecutive integers, reduced modulo the modulus, and then mapped to a symmetric range (subtracting the modulus if the result exceeds half of it). Based on these results, generate multiple function terms, each formed by multiplying a non-zero result by a corresponding basis function, and sum them to produce a curve that reveals periodic patterns under modular arithmetic. Arrange the interface to clearly show the inputs, the step-by-step computation, and the final graph.
The prompt above was compiled from the original drawing commands and is for reference only.