You are viewing a single comment's thread. Return to all comments →
Start with the base values (using python here) and given t
t
t = 1, 4, 10, 22... v = 3, 6, 12, 24... => t = 3 * 2**n - 2
t = 1, 4, 10, 22... v = 3, 6, 12, 24...
t = 3 * 2**n - 2
We can solve for n
n
n = math.log2((t + 2) / 3)
We can get the base value Bv of all t by flooring n
Bv
Bv = 3 * 2**(n//1)
Next look at the sequence t = 10, 11, 12, 13... v = 12, 11, 10, 9...
t = 10, 11, 12, 13... v = 12, 11, 10, 9...
v is twice the base value of each sequence minus t minus 2
v
v = 2 * Bv - t - 2
So we can solve with int(6 * 2**(math.log2((t + 2) / 3) // 1) - t - 2)
int(6 * 2**(math.log2((t + 2) / 3) // 1) - t - 2)
Seems like cookies are disabled on this browser, please enable them to open this website
Strange Counter
You are viewing a single comment's thread. Return to all comments →
Start with the base values (using python here) and given
t
t = 1, 4, 10, 22... v = 3, 6, 12, 24...
=>t = 3 * 2**n - 2
We can solve for
n
n = math.log2((t + 2) / 3)
We can get the base value
Bv
of allt
by flooringn
Bv = 3 * 2**(n//1)
Next look at the sequence
t = 10, 11, 12, 13... v = 12, 11, 10, 9...
v
is twice the base value of each sequence minust
minus 2v = 2 * Bv - t - 2
So we can solve with
int(6 * 2**(math.log2((t + 2) / 3) // 1) - t - 2)