I'm still not sure about the square graphs I've been making so I decided to go back a few threads and just read up on what VQC has been saying and posting.
I was thinking about the diagram he posted in >>4322 in which each of the triangle has a capstone equal to (n - 1) (or is it the base of the capstone?).
So I decided to try and make a square using the equation:
nn + 2(d-4)(n-1) + 8(n - 1) + (f - 1)
Attached is an image of the square. To explain it:
The red part is 8(n - 1), the orange parts outside of it is multiples of 2(d - 4) and the yellow one is an attempt at trying to use f-1 as a base similar to what he suggested in >>4342 and >>4344.
Outside is still more multiples of 2(d-4) and the green is n*n.
The green next to the capstone was empty after filling in the 2(d-4) inside of the f-1/8 base and could have been filled in by one of the outer 2(d-4) (which would place 4 green blocks at the (x+n-1)/2 base). Not sure If it makes sense yet, but I'm going to keep trying a few more squares with this pattern.
Again, but this time for a=7, b=37. Also the previous one is not f-1, I'm using f-2 so the result is 8T(u) and not 8T(u) + 1. Same for this one.
So with a=7, b=37 our base of (f-2)/8 will consist of 3.5, meaning 4 of the triangles with have base = 3 and 4 will have with base = 4 (asymmetrical).
This will cause our f-2 to overlap with 8*(n - 1) and as a result we will have leftovers in our triangle.
I think this might be what VQC is referring to in >>4337. Since I'm using 2 * (d - 4) * (n - 1) the last d to add (since n - 1 is odd by the fact that we're after n's that are even) will be (d - 4).
In this example (d - 4) % 8 = 4, which is also the amount of (n - 1)'s that have been displaced by (f-2).
Legend:
red = 8*(n - 1)
oranges = different multiples of 2*(d - 4)
yellow = triangle created by (f-2)/8
green = n*n.
Also note that the 2(d-4) displaces some of the nn (green) which is filled in on the opposite side of the square.
Last one for now. This is a=55, b=129 which contains 4 factors as a = 11 * 5 and b = 3 * 43. In this case a lot just lines up. 2*(d - 4) / 8 = 20, f-2 / 8 = 16 so there are no remainder.
The only interesting part is that the amount of units of d for the last d is equal to (n-1), but this could be a fluke.
Legend is the same as above. Variations of these factors can (and should!?) be explored as this example contains 4 factors.
I'll see if I can make one this time where I do (f-2)/16 to see if I can get a two-wide unit of f-2 divided up here. Since this one has a base of 16, it might yield some more insight.
Also! Optical illusion time, the inner-most 2d which is the first 2(d-4) outside of the red area is the same colour as the 2(d-4) that is on the same base as the n*n (green).
Algorithm suggestion time.
We use the equation nn + 2(d-4)(n-1) + 8(n-1) + f - 2 = 8T(u)
We start by making our (f-2)/8 base. Note it doesn't have to be 8, but it can be a multiple of 8.
Then we generate a triangle with (f-2) as base. Right now we don't know n. But we know we need to add 2(d-4)(n-1) so we start by adding two 2(d-4) leaving us with n = 2. (n-1) is now 1 so we add one red at the top of our triangle.
This gives us nn/8 to add outside of our triangle. We leave them be for now.
We add another 2(d-4) (n=3) and add another red square at the top. We continue to do so until 2(d-4) meets the red squares. At this point we've added 5 2(d-4) and will overlap with red squares if we add another. Instead we add 2(d-4) outside of our (f-2)/8 triangle. Keep in mind we can now add nn/8 outside as well.
We continue until our last 2(d-4) collided with green squares (nn/8). Then we use the remainder of that 2(d-4) to fill in the missing center squares.
Makes sense?
Check out https:// math.stackexchange.com/questions/30458/modular-arithmetic-solving-ax-b-equiv-c-pmod-d
I don't have time to dig into this now, but I'll spend the weekend looking into it (and other related modular arithmetic). It sounds like it could be the sweet spot.
VQC has said that (0, 1) and (1, 1) is equally good to (e, 1). If we really are looking for a way of using the D[t]-d pattern as a shortcut then I think I understand why they are equally good.
Since the d-value increase when you move right starting from (0, 1) to (2, 1) by one and (1, 1) to (3, 1) we can simply remove e/2 (for even e) and (e - 1)/2 for odd e from d. That should allow us to use the D[t] in (0, 1) or (1, 1) since the difference in d from (0, 1) to (e, 1) (for even e) is e/2 and the difference in d from (1, 1) to (e, 1) (for odd e) is (e - 1)/2.
But that's about it. Still looking into the whole D[t]-d, but I feel like I'm regressing a bit to previous threads.
I think I found a way to relate the equation:
nn + 2d*(n - 1) + f - 1 = 1 + 8T(u)
back to the grid. I was playing with algebra and I was looking into PMAs idea about using:
nn + (2d - 1)*(n - 1) + (n - 1) + f - 1 = 1 + 8T(u)
and I trailed off a bit, just playing with the equation.
Mind the algebra coming in:
nn + (2d - 1)(n - 1) + (n - 1) + f - 1 = 1 + 8T(u)
We know T(u) (Triangle) is equal to u * (u + 1)/2. This gives us:
nn + (2d - 1)(n - 1) + (n - 1) + f - 1 = 1 + 8( u*(u + 1)/2 )
We eliminate /2 by dividing out 8*T(u) by 2:
nn + (2d - 1)(n - 1) + (n - 1) + f - 1 = 1 + 4( u*(u + 1) )
Then we mix n*n + (n - 1) into (note -1 joined at the end and became -2):
n(n + 1) - 1 + (2d - 1)(n - 1) + f - 1 = 1 + 4( u*(u + 1) )
n(n + 1) + (2d - 1)(n - 1) + f - 2 = 1 + 4( u*(u + 1) )
I "unrolled" f into 2 * d + 1 - e:
n(n + 1) + (2d - 1)(n - 1) + 2d + 1 - e - 2 = 1 + 4( u(u + 1) )
Which gives us:
n(n + 1) + (2d - 1)(n - 1) + 2d - e - 1 = 1 + 4( u(u + 1) )
We move the 1 + to the other side:
n(n + 1) + (2d - 1)(n - 1) + 2d - e - 2 = 4( u(u + 1) )
Now we blend (2d - 1)(n - 1) + 2d into n(2d - 1) + 1:
n(n + 1) + n(2d - 1) + 1 - e - 2 = 4( u(u + 1) )
n(n + 1) + n(2d - 1) - e - 1 = 4( u(u + 1) )
n(n + 1) + n(2d - 1) is equal to n(2d - n):
n(2d + n) - (e + 1) = 4( u*(u + 1) )
We now divide by 2:
n(2d + n)/2 - (e + 1)/2 = 2( u*(u + 1) )
We move (e + 1)/2 to the other side:
n(2d + n)/2 = 2( u*(u + 1) ) + (e + 1)/2
And here it is. 2( u * (u + 1) ) + (e + 1)/2 should be fairly recognisable as it is our method of calculating d's for even e (almost, d for even e is 2k*(k+1) + e/2. I'm not sure if we can have an odd x+n with an even e and even n? I haven't found any, but I haven't looked super hard either.).
I would love it if someone could double-check my math and preferable re-do the equation.
If this is correct, then n(2d + n)/2 will appear as a d in (e+1, 1).
I could be walking around in an algebraic labyrinth here and fooling myself into thinking this is something insightful.
n(2d + n) is of course what you add to c - e to get (d + n)**2. This is also the generalized difference of two perfect squares (since we removed e, the remainder).
Thanks!
I played a bit more with the algebra and realised that we can express our equation as this:
n(n+1) + n(2d - 1) = 8( u * (u+1)/2 ) + (e + 1)
And by multiplying two and dividing by two on the first term we get (Essentially a NOP operations, but used for visualization):
2(n(n+1)/2) + n(2d - 1) = 8(u(u+1)/2) + (e + 1)
So the left side can be explained using two triangles of n, pluss n(2d - 1). I've been struggeling with ideas recently, so I decided to just play with the equation a bit. I don't see how 2 triangles of N is useful, but if it is you guys would know.
Just to carry this though a bit more. Any (x + n)^2 in (e, n) (I've only checked odd x and even n's) can be expressed as 2*a - e from (e, 1).
This means our x+n square consists of 8 triangles where (x+n)^2 - 1 consists of two halves of an a from (e, 1) and each triangle represents one quarter of an a at t in (e, 1).
Not sure if this is of much use, but I found it interesting. It's like the grid is completely connected to itself.
As for use though, it could be used as a search algorithm, but painfully slow. PMA already had a better iterative search algorithm. To make it easier of use one could use the n in (1, c) as a starting point, but even that n grows too fast.
The left-side pyramid looks a lot like two triangles from our grid put together.
I've also been thinking about polite numbers. I've been trying to brute-force some polite numbers from our (x+n)**2 and f, f-1, f-2 etc. My reasoning is that if we can get the polite numbers and are reasonably sure we have the correct polite numbers VQC has been referring to, then we can try and go backwards, trying to figure out the patterns behind them.
I haven't gotten much done yet, but I was thinking about them today. We know we are looking for two polite numbers where one is a unit longer at the base than the other.
A polite number is a number that can be expressed as the sum of two or more consecutive positive integers.
In our case we will have an a, which is the base of the shortest polite number. We can think of a polite number as a_0 + a_1 + … a_k where each a_i is an monotonically incrementing number. Or, another way as a + (a + 1) + (a + 2) + … + (a + k). (a here represents the offset as we are looking for polite numbers and not triangles (maybe sometimes these two overlap? )).
Our two values would be shaped like this:
Polite number #1: a + (a + 1) + … + (a + k)
Polite number #2: (a + 1) + (a + 2) + … + (a + k)
I wrote a very basic brute force which essentially looped from 1 to k, continually increasing the number of integers with an inner loop increasing a. This is quite inefficient and I was thinking about our expression above. We can rewrite it to something like this:
ak + k(k + 1)/2
We are adding a, k times which means we can multiply a by k. We are adding 1 + 2 + 3 .. which we can do faster, which means it is also a triangular number.
I also noted that this can be expressed as k(2a + k + 1)/2. Which is also similar to what our nn + 2d*(n - 1) + f - 2 can be turned into (With - / + depending on the f and e value). It's also the generalized difference of two perfect squares https:// en.wikipedia.org/wiki/Difference_of_two_squares#Generalizations
I'm loving this, GA!
I was a bit quick at reading it the first, just needed to write out my thoughts on the matter. But I really like this view of it.
I think I got record generation for (-e, 1) rows. Not sure if this is something we already have. I might have missed it previously, but in the event we don't know it:
(-e, 1)
Odd e:
t = floor(sqrt(e/2))
d = 2(t + 1)*2 - (e + 1)/2
a = 2t(t+1) - (e - 1)/2
b = 2(t + 1)(t + 2) - (e - 1)/2
x = 2*t + 1
Even e:
t = floor(sqrt(e/2))
d = 2(t + 1)(t + 2) - e/2
a = 2(t + 1)*2 - e/2
b = 2(t + 2)*2 - e/2
x = 2*(t + 1)
Note that t is set to the floor of the square root of half of e. This is the initial t=0 for the record. We do this is because it will require an offset. Since we are subtracting half of (e +/- 1) we will end up with negative values unless we offset t. We do so by offsetting t with the lowest number that will result in a positive integer for all the equations.
I haven't tested this below -64, since I haven't generated a grid beyond that. Verification would be appreciated.
Found a relation between (-f, 1) and (e, 1) for an and a(n-1) with (0, 1).
t at a[t] = an in (e, 1) will equal an a at same t in (0, 1).
(from (0, 1)) a[t] - f/2 will be a(n-1) in (-f, 1)
f/2 is because of the movement between (e, 1)'s.
Example:
{27:6:18:9:9:39}
f = 2*18 + 1 - 27 = 10
9 * 5 = 45
9 * 6 = 54
a[5] = 54 in (27, 1) and a[5] = 50 in (0, 1)
50 - f/2 = 50 - 5 = 45.
Seems to hold fine for records with an odd e.
For odd f's it relates to (1, 1) and you do (f+1)/2
I'm still looking into this, but I found something that made me wrinkle my nose a bit.
We have a c. Calculate e, d and f.
Then compute row (1, c). Now we know the n here is in (e, 1). Find the t of that n in (e, 1).
Then calculate the (0, 1) a[t] for that t. Then do a[t] - f/2. It appears that this number has (n - 1) as a factor in it. I'm going to run more tests, but if someone could double check that would be great.
Note, so far I'm checking odd e, even n's.
I found a counter example (a = 27, b = 93), but still a lot of matches. Can't say why exactly yet.
I'm just spitballin' an idea here. It's jumping a bit further, but we know f is what we add to c to make a square, we can also "jump" further.
When we are computing f, we are doing:
1(2d + 1) - e
But we can also do n(2d + n) - e
For example 2(2d + 2) - e would be f2 and at (-f2, 1) we should have a(n - 2) and b(n - 2). We could increase this of course to f3, f4 etc and each time we would have a row that contains an a[t] = a(n - 3), a(n - 4) etc..
I haven't looked into this pattern and I'm not sure if this is derailing VQCs thoughts, but it was just a thought that popped into my head.
When I did this, same example c=145 I ended up with the record:
{-111:1:16:11:5:29}
After doing 56 jumps. Here the d = 16 though.
You can see the a under the transformed record is close to the number of required jumps. The difference between the two appears to be a.
The x under the "End Record" also matches the x in the transformed record.
Since I didn't add a column for it. The transformed record is transformed from (1, c). So finding the proper a after all those jumps is done purely knowing c only. I added the proper record under "Start Record" but that is misleading. The start record is infact (1, c).
No this doesn't hold or work, I was missing parentheses when I tested so no dice.
Regarding:
> The position of column 0 acts as a key with these two unique columns to fufill an equivalent role of the quantum Fourier transform in Shors algorithm.
I can't say anything with regards to the quantum Fourier part, but for using (0, 1) I see now how it would work (at least for an even -f and odd e).
The equation we use for a in an even -f is the same as the equation we use for d in an odd e.
Essentially (0, 1) "balances" the difference between -f and e. The difference is of course the f/2 and (e-1)/2 we add or remove.
The equation for a in an even (-f, 1) is:
2tt - (f/2)
While the equation for d in an odd (e, 1) is:
2tt + (e-1)/2
However the equation used for a's in (0, 1) is:
2tt.
We can see how the a's in (-f, 1) are a's from (0, 1) minus f/2 while the d's in (e, 1) is the a's from (0, 1) plus (e-1)/2. By iterating over only (0, 1) we should be able to find all our required values (for cases when f is even and e is odd).
I'm not saying it ONLY applies to that case, I just haven't looked enough into it. Though I'd share. Also we don't want to iterate obviously, but I was just stating that as to show how powerful (0, 1) is.