Skip to main content
Giuga numbers no longer uses division
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52

This can be shortened further, thanks to a trick found by Grimmy (and used in this post). I've used it to shorten factorial, Proth, \$np_n\$, and consecutive-prime/constant-exponent regexes. (Giuga numbers also uses the shortened form, but cannot benefit from this trick.) As a standalone division regex, it comes in at 39 bytes:

This can be shortened further, thanks to a trick found by Grimmy (and used in this post). I've used it to shorten factorial, Proth, \$np_n\$, and consecutive-prime/constant-exponent regexes. (Giuga numbers also uses the shortened form, but cannot benefit from this trick.) As a standalone division regex, it comes in at 39 bytes:

This can be shortened further, thanks to a trick found by Grimmy (and used in this post). I've used it to shorten factorial, Proth, \$np_n\$, and consecutive-prime/constant-exponent regexes. As a standalone division regex, it comes in at 39 bytes:

link to Giuga numbers
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52

This can be shortened further, thanks to a trick found by Grimmy (and used in this post). I've used it to shorten factorial, Proth, \$np_n\$, and consecutive-prime/constant-exponent regexes. (Giuga numbers also uses the shortened form, but cannot benefit from this trick.) As a standalone division regex, it comes in at 39 bytes:

This can be shortened further, thanks to a trick found by Grimmy (and used in this post). I've used it to shorten factorial, Proth, \$np_n\$, and consecutive-prime/constant-exponent regexes. As a standalone division regex, it comes in at 39 bytes:

This can be shortened further, thanks to a trick found by Grimmy (and used in this post). I've used it to shorten factorial, Proth, \$np_n\$, and consecutive-prime/constant-exponent regexes. (Giuga numbers also uses the shortened form, but cannot benefit from this trick.) As a standalone division regex, it comes in at 39 bytes:

document another use of this regex
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
document another use of this regex
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
Note the use of the second shortened form
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
Improve the proofs' formatting
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
in the general-form proof, put two similar constructions side by side for compactness
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
Add the proof that the first shortened form of division always works when A is a prime power
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
show why the case of A=C works in the first shortened form
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
deleted 147 characters in body
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
Add the proof for why the generalized division regex always works
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
Add the proof for why the generalized division regex always works
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
more comments regarding: -8 bytes on the second form of shortened division, as proven by the math! And it works!
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
-8 bytes on the second form of shortened division, as proven by the math! And it works!
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
Add the proof that the second shortened form of division always works within the constraints specified
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
simplify the TIOs a bit for the second case of simplified division
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
added 44 characters in body; deleted 47 characters in body
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
added 41 characters in body
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
remove a statement unneeded for the proof
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
Add the proof that the first shortened form of division always works within the constraints specified
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
show an extra step in the shortening of the regex
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
this form of division is also the optimal one in Python "import re" regex, due to its lack of forward-declared backreferences
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
fix typo in pretty-printed version
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading
show list of other regexes using this division algorithm
Source Link
Deadcode
  • 11.9k
  • 1
  • 66
  • 52
Loading