Numbers ending in $0$, $2$, $4$, $6$ and $8$ are not prime because by Divisibility by 2 they are divisible by $2$. Numbers ending in $0$ and $5$ are not prime because by Divisibility by 5 they are divisible by $5$. Hence each of $872\,894$, $872\,895$, $872\,896$ and $872\,898$ remain composite when you change any of their digits except the last one. So we inspect the prime factors of the following, only bothering to check the numbers ending in $1$, $3$, $7$ and $9$: {{begin-eqn}} {{eqn | l = 872\,891       | r = 271 \times 3221       | c = Not prime }} {{eqn | l = 872\,893       | r = 7 \times 124699       | c = Not prime }} {{eqn | l = 872\,897       | r = 263 \times 3319       | c = Not prime }} {{eqn | l = 872\,897       | r = 17 \times 51347       | c = Not prime }} {{end-eqn}} All we need to do now is to inspect $872\,897$. {{begin-eqn}} {{eqn | l = 072\,897       | r = 3 \times 11 \times 472       | c = Not prime }} {{eqn | l = 172\,897       | r = 41 \times 4217       | c = Not prime }} {{eqn | l = 272\,897       | r = 19 \times 53 \times 271       | c = Not prime }} {{eqn | l = 372\,897       | r = 3^3 \times 7 \times 1973       | c = Not prime }} {{eqn | l = 472\,897       | r = 37 \times 12781       | c = Not prime }} {{eqn | l = 572\,897       | r = 13 \times 127 \times 347       | c = Not prime }} {{eqn | l = 672\,897       | r = 3 \times 224299       | c = Not prime }} {{eqn | l = 772\,897       | r = 757 \times 1021       | c = Not prime }} {{eqn | l = 972\,897       | r = 3 \times 324299       | c = Not prime }} {{end-eqn}} {{begin-eqn}} {{eqn | l = 802\,897       | r = 53 \times 15149       | c = Not prime }} {{eqn | l = 812\,897       | r = 733 \times 1109       | c = Not prime }} {{eqn | l = 822\,897       | r = 3^2 \times 91433       | c = Not prime }} {{eqn | l = 832\,897       | r = 13 \times 79 \times 811       | c = Not prime }} {{eqn | l = 842\,897       | r = 11 \times 19 \times 37 \times 109       | c = Not prime }} {{eqn | l = 852\,897       | r = 3 \times 107 \times 2657       | c = Not prime }} {{eqn | l = 862\,897       | r = 7 \times 131 \times 941       | c = Not prime }} {{eqn | l = 882\,897       | r = 3 \times 151 \times 1949       | c = Not prime }} {{eqn | l = 892\,897       | r = 607 \times 1471       | c = Not prime }} {{end-eqn}} {{begin-eqn}} {{eqn | l = 870\,897       | r = 3 \times 61 \times 4759       | c = Not prime }} {{eqn | l = 871\,897       | r = 13 \times 47 \times 1427       | c = Not prime }} {{eqn | l = 873\,897       | r = 3 \times 291299       | c = Not prime }} {{eqn | l = 874\,897       | r = 23 \times 38039       | c = Not prime }} {{eqn | l = 875\,897       | r = 11 \times 79627       | c = Not prime }} {{eqn | l = 876\,897       | r = 3^2 \times 7 \times 31 \times 449       | c = Not prime }} {{eqn | l = 877\,897       | r = 17 \times 113 \times 457       | c = Not prime }} {{eqn | l = 878\,897       | r = 139 \times 6323       | c = Not prime }} {{eqn | l = 879\,897       | r = 3 \times 37 \times 7927       | c = Not prime }} {{end-eqn}} {{begin-eqn}} {{eqn | l = 872\,097       | r = 3 \times 149 \times 1951       | c = Not prime }} {{eqn | l = 872\,197       | r = 59 \times 14783       | c = Not prime }} {{eqn | l = 872\,297       | r = 191 \times 4567       | c = Not prime }} {{eqn | l = 872\,397       | r = 3^3 \times 79 \times 409       | c = Not prime }} {{eqn | l = 872\,497       | r = 37 \times 23581       | c = Not prime }} {{eqn | l = 872\,597       | r = 11 \times 23 \times 3449       | c = Not prime }} {{eqn | l = 872\,697       | r = 3 \times 7 \times 29 \times 1433       | c = Not prime }} {{eqn | l = 872\,797       | r = 17 \times 51341       | c = Not prime }} {{eqn | l = 872\,997       | r = 3 \times 290999       | c = Not prime }} {{end-eqn}} {{begin-eqn}} {{eqn | l = 872\,807       | r = 13 \times 67139       | c = Not prime }} {{eqn | l = 872\,817       | r = 3 \times 11 \times 26449       | c = Not prime }} {{eqn | l = 872\,827       | r = 23 \times 137 \times 277       | c = Not prime }} {{eqn | l = 872\,837       | r = 7^2 \times 47 \times 379       | c = Not prime }} {{eqn | l = 872\,847       | r = 3^2 \times 293 \times 331       | c = Not prime }} {{eqn | l = 872\,857       | r = 43 \times 53 \times 383       | c = Not prime }} {{eqn | l = 872\,867       | r = 31 \times 37 \times 761       | c = Not prime }} {{eqn | l = 872\,877       | r = 3 \times 290959       | c = Not prime }} {{eqn | l = 872\,887       | r = 523 \times 1669       | c = Not prime }} {{end-eqn}} The result has been proven. {{qed}}