OFFSET
1,6
COMMENTS
The natural numbers are sorted by the relative order and disorder of their n binary digits as measured by the bientropy function. When two or more natural numbers have the same bientropy, their natural order is preserved.
LINKS
Grenville J. Croll, Bientropy: the measurement and algebras of order and disorder in finite binary strings, Scientific essays in honor of H. Pierre Noyes on the occasion of his 90th Birthday, World Scientific, 2014, pages 48-64.
Grenville J. Croll, BiEntropy, TriEntropy and Primality, arXiv:1912.08051 [cs.OH], 2019.
Grenville J. Croll, BiEntropy, TriEntropy and Primality, Entropy 2020, 22, 311.
Grenville J. Croll, BiEntropy_TriEntropy_and_Primality.zip, Figshare Dataset, 2020.
FORMULA
Given a binary string s = s1...sn (where in this application n >= 8), there are n-1 binary derivatives of s, Dk(s), 1 <= k <= n-1.
The first binary derivative of s, D1(s), is the binary string of length n-1 formed by XORing adjacent pairs of digits of s.
We refer to the k-th derivative of s, Dk(s), as the binary derivative of Dk-1(s).
p(k) is the proportion of 1's in Dk.
D0 = s;
0*log_2(0) is defined to be 0;
C = 1/(2^(n-1)-1);
D = Sum_{k=0..n-2}(-p(k)*log_2(p(k))-(1-p(k))*log_2(1-p(k)))*2^k.
bientropy(s) = C*D;
EXAMPLE
For example, the bientropy of eleven is 0.9506 as its binary digits (00001011) are not periodic. The sequence always starts with zero as zero is a periodic binary number (00000000...) with a bientropy of 0.0000. Each row j reveals where the j-th natural number sits relative to the rest given its bientropy.
Triangle begins:
0,
0, 1,
0, 1, 2,
0, 3, 1, 2,
0, 3, 1, 2, 4,
0, 5, 3, 1, 2, 4,
0, 5, 3, 6, 1, 2, 4,
0, 5, 3, 6, 1, 2, 7, 4,
0, 5, 3, 6, 1, 8, 2, 7, 4,
0, 5, 3, 6, 9, 1, 8, 2, 7, 4,
0, 5, 10, 3, 6, 9, 1, 8, 2, 7, 4,
0, 5, 10, 3, 6, 9, 1, 8, 2, 7, 4, 11
...
PROG
(Excel) See Grenville J. Croll Figshare link.
CROSSREFS
KEYWORD
AUTHOR
Grenville J. Croll, May 11 2020
STATUS
approved