Feedback

modular-arithmetic

@parcadei Claim

Basic information

Repository
parcadei
Skill
modular-arithmetic

About modular-arithmetic

Problem-solving strategies for modular arithmetic in graph number theory

modular-arithmetic is an agent skill listed in the AddMCP.net directory, published by parcadei. Runtime: Python. License: MIT. The repository has 3,944 GitHub stars. Source code is hosted on github.com. Related topics: agents, claude-code, claude-code-cli, claude-code-hooks, claude-code-mcp.

Overview

What is modular-arithmetic?


name: modular-arithmetic description: "Problem-solving strategies for modular arithmetic in graph number theory" allowed-tools: [Bash, Read]


Modular Arithmetic

modular-arithmetic tools

See .claude/skills/math-mode/SKILL.md for full tool documentation.

When to Use

Use this skill when working on modular-arithmetic problems in graph number theory.

Decision Tree

  1. Extended Euclidean Algorithm
  • Find gcd(a,b) and x,y with ax + by = gcd(a,b)
  • Modular inverse: a^{-1} mod n when gcd(a,n) = 1
  • sympy_compute.py solve "a*x == 1 mod n"
  1. Chinese Remainder Theorem
  • System x = a_i (mod m_i) with coprime m_i
  • Unique solution mod prod(m_i)
  • z3_solve.py prove "crt_solution_exists"
  1. Euler's Theorem
  • a^{phi(n)} = 1 (mod n) when gcd(a,n) = 1
  • phi(p^k) = p^{k-1}(p-1)
  • sympy_compute.py simplify "euler_phi"
  1. Quadratic Residues
  • Legendre symbol: (a/p) = a^{(p-1)/2} mod p
  • Quadratic reciprocity: (p/q)(q/p) = (-1)^{...}
  • Tonelli-Shanks for square roots
  1. Order and Primitive Roots
  • ord_n(a) = smallest k with a^k = 1 (mod n)
  • Primitive root: ord_n(a) = phi(n)

Key Techniques

From indexed textbooks:

  • [Graph Theory (Graduate Texts in Mathematics (173))] By N we denote the set of natural numbers, including zero. The set Z/nZ of integers modulo n is denoted by Zn; its elements are written as i := i + nZ. When we regard Z2 = {0, 1} as a eld, we also denote it as F2 = {0, 1}.

Comments

No comments yet

Be the first to share feedback about this listing. Sign in to leave a comment.

Sign In

Feedback 💬