Corresponding author: Peter Fenwick (

Academic editor:

A recent paper described a variable-length integer code based on the Goldbach conjecture where every codeword had exactly 2 1-bits but with an extremely irregular structure. A later, unpublished, work produced a much more regular code, again with a Hamming weight of 2. This paper extends that later work to weight-3 and weight-4 codes, which are shown to be competitive with more-usual codes over a useful range of values.