Problem:
Is the following number prime?
7213
Answer:
\begin{array}{l}
 
\begin{array}{l}
 \text{Test for primality}: \\
 \text{is }7213\text{ a }\text{prime number?} \\
\end{array}
 \\
\hline
 
\begin{array}{l}
 \text{Since }\sqrt{7213}\approx 84.9, \text{it }\text{is }\text{sufficient }\text{to }\text{test }\text{7213 }\text{for }\text{divisibility }\text{by }\text{primes }\text{less }\text{than }\text{or }\text{equal }\text{to }84: \\
 \text{Test }\text{primes }\text{up }\text{to }\text{84 }\text{for }\text{factors }\text{of }7213 \\
\end{array}
 \\
 
\begin{array}{l}
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }2 \text{since }\text{7213 }\text{is }\text{odd }\text{and }2 \text{is }\text{even}: \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2 \\
\end{array}
 \\
 
\begin{array}{l}
 \text{The }\text{sum }\text{of }\text{the }\text{digits }\text{of }\text{7213 }\text{is }7+2+1+3=13, \text{which }\text{is }\text{not }\text{divisible }\text{by }3. \text{This }\text{means }\text{7213 }\text{is }\text{not }\text{divisible }\text{by }3: \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2\text{ or }3 \\
\end{array}
 \\
 
\begin{array}{l}
 \text{The }\text{last }\text{digit }\text{of }\text{7213 }\text{is }\text{not }5 \text{or }0, \text{which }\text{means }\text{7213 }\text{is }\text{not }\text{divisible }\text{by }5: \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3\text{ or }5 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }7 \text{into }7213: \\
 
\begin{array}{cccccc}
 \text{} &  &  &  &  &  \\
  &  &  &  &  & \text{} \\
  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  \\
 \text{} &  &  &  &  &  \\
 \text{} & \text{} &  &  &  &  \\
 \text{} &  &  &  &  &  \\
 \text{} & \text{} & \text{} &  &  &  \\
 \text{} & \text{} & \text{} &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }7: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5\text{ or }7 \\
\end{array}
 \\
 
\begin{array}{l}
 \text{The }\text{alternating }\text{sum }\text{of }\text{the }\text{digits }\text{of }\text{7213 }\text{is }7-2+1-3=3, \text{which }\text{is }\text{not }\text{divisible }\text{by }\text{11. }\text{This }\text{means }\text{7213 }\text{is }\text{not }\text{divisible }\text{by }11: \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7\text{ or }11 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }\text{13 }\text{into }7213: \\
 
\begin{array}{ccccccc}
 \text{} & \text{} & \text{} &  &  &  &  \\
  &  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  &  \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
 \text{} & \text{} & \text{} &  &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }13: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7,11\text{ or }13 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }\text{17 }\text{into }7213: \\
 
\begin{array}{ccccccc}
 \text{} & \text{} & \text{} &  &  &  &  \\
  &  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  &  \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
 \text{} & \text{} & \text{} &  &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} & \text{} &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }17: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7,11,13\text{ or }17 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }\text{19 }\text{into }7213: \\
 
\begin{array}{ccccccc}
 \text{} & \text{} & \text{} &  &  &  &  \\
  &  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  & \text{} \\
 \text{} & \text{} &  &  &  &  &  \\
 \text{} &  &  &  &  &  &  \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }19: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7,11,13,17\text{ or }19 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }\text{23 }\text{into }7213: \\
 
\begin{array}{ccccccc}
 \text{} & \text{} & \text{} &  &  &  &  \\
  &  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  &  \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
 \text{} & \text{} & \text{} &  &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }23: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7,11,13,17,19\text{ or }23 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }\text{29 }\text{into }7213: \\
 
\begin{array}{ccccccc}
 \text{} & \text{} & \text{} &  &  &  &  \\
  &  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  & \text{} \\
 \text{} & \text{} &  &  &  &  &  \\
 \text{} &  &  &  &  &  &  \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }29: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7,11,13,17,19,23\text{ or }29 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }\text{31 }\text{into }7213: \\
 
\begin{array}{ccccccc}
 \text{} & \text{} & \text{} &  &  &  &  \\
  &  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  & \text{} \\
 \text{} & \text{} &  &  &  &  &  \\
 \text{} &  &  &  &  &  &  \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
 \text{} & \text{} & \text{} &  &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }31: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7,11,13,17,19,23,29\text{ or }31 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }\text{37 }\text{into }7213: \\
 
\begin{array}{ccccccc}
 \text{} & \text{} & \text{} &  &  &  &  \\
  &  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  & \text{} \\
 \text{} & \text{} &  &  &  &  &  \\
 \text{} &  &  &  &  &  &  \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }37: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7,11,13,17,19,23,29,31\text{ or }37 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }\text{41 }\text{into }7213: \\
 
\begin{array}{ccccccc}
 \text{} & \text{} & \text{} &  &  &  &  \\
  &  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  & \text{} \\
 \text{} & \text{} &  &  &  &  &  \\
 \text{} &  &  &  &  &  &  \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }41: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7,11,13,17,19,23,29,31,37\text{ or }41 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }\text{43 }\text{into }7213: \\
 
\begin{array}{ccccccc}
 \text{} & \text{} & \text{} &  &  &  &  \\
  &  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  & \text{} \\
 \text{} & \text{} &  &  &  &  &  \\
 \text{} &  &  &  &  &  &  \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }43: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7,11,13,17,19,23,29,31,37,41\text{ or }43 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }\text{47 }\text{into }7213: \\
 
\begin{array}{ccccccc}
 \text{} & \text{} & \text{} &  &  &  &  \\
  &  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  & \text{} \\
 \text{} & \text{} &  &  &  &  &  \\
 \text{} &  &  &  &  &  &  \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }47: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7,11,13,17,19,23,29,31,37,41,43\text{ or }47 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }\text{53 }\text{into }7213: \\
 
\begin{array}{ccccccc}
 \text{} & \text{} & \text{} &  &  &  &  \\
  &  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  & \text{} \\
 \text{} & \text{} &  &  &  &  &  \\
 \text{} &  &  &  &  &  &  \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} & \text{} &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }53: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47\text{ or }53 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }\text{59 }\text{into }7213: \\
 
\begin{array}{ccccccc}
 \text{} & \text{} & \text{} &  &  &  &  \\
  &  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  & \text{} \\
 \text{} & \text{} &  &  &  &  &  \\
 \text{} &  &  &  &  &  &  \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }59: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53\text{ or }59 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }\text{61 }\text{into }7213: \\
 
\begin{array}{ccccccc}
 \text{} & \text{} & \text{} &  &  &  &  \\
  &  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  & \text{} \\
 \text{} & \text{} &  &  &  &  &  \\
 \text{} &  &  &  &  &  &  \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }61: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59\text{ or }61 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }\text{67 }\text{into }7213: \\
 
\begin{array}{ccccccc}
 \text{} & \text{} & \text{} &  &  &  &  \\
  &  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  &  \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }67: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61\text{ or }67 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }\text{71 }\text{into }7213: \\
 
\begin{array}{ccccccc}
 \text{} & \text{} & \text{} &  &  &  &  \\
  &  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  &  \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }71: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67\text{ or }71 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }\text{73 }\text{into }7213: \\
 
\begin{array}{ccccccc}
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
  &  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }73: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71\text{ or }73 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }\text{79 }\text{into }7213: \\
 
\begin{array}{ccccccc}
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
  &  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }79: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73\text{ or }79 \\
\end{array}
 \\
 
\begin{array}{l}
 
\begin{array}{l}
 \text{Divide }\text{83 }\text{into }7213: \\
 
\begin{array}{ccccccc}
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
  &  &  &  &  &  & \text{} \\
 \text{} &  &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} &  &  &  &  \\
 \text{} & \text{} &  &  &  &  & \text{} \\
 \text{} & \text{} & \text{} & \text{} &  &  &  \\
\end{array}
 \\
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }83: \\
\end{array}
 \\
 \text{7213 }\text{is} \text{not }\text{divisible }\text{by} 2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79\text{ or }83 \\
\end{array}
 \\
 
\begin{array}{l}
 \text{7213 }\text{is }\text{not }\text{divisible }\text{by }\text{any }\text{prime }\text{less }\text{than }\sqrt{7213}\approx 84.9. \text{Therefore, }\text{7213 }\text{is }\text{prime}: \\
 \fbox{$
\begin{array}{ll}
 \text{Answer:} &  \\
 \text{} & 7213\text{ is a }\text{prime} \text{number} \\
\end{array}
$} \\
\end{array}
 \\
\end{array}

{'source': 'AMPS', 'file': 'amps/mathematica/number_theory/is_prime_w_steps/2764.txt'}