Teach !!UgZAPoSXEk ID: 68a051 Jan. 28, 2018, 11 a.m. No.3485   🗄️.is 🔗kun   >>3487 >>3493

Hey guys, sorry I've been busy for a bit with work and haven't been able to post.

 

But this problem has still been on my mind, and I've made some more observations in patterns:

 

ab = dd + e

2an = xx + e

 

a is a factor of both dd+e and xx+e. This is the tree growth I believe that we were guided with.

 

2ab = 2(dd + e)

In this case our n for c = c becomes our original b.

 

4ab = 4(dd + e)

4ab = (2d)(2d) + 4e

 

In this case n = 2b.

 

I think these could be the key to unlocking this thing.

 

—-

 

1 more pattern i've observed that I think is linked:

 

a + b = 2(d+n)

a - b = 2(x+n)

 

Still trying to put this all together. But I think with these 2 tips we should be able to get it done.

 

How's everyone else?

 

There have been many posts since I've been here last, anything in particular I should look into?

Teach !!UgZAPoSXEk ID: 68a051 Jan. 28, 2018, 11:30 a.m. No.3488   🗄️.is 🔗kun   >>3490

>>3487

>a + b = 2(d+n) is correct, but a - b = 2(x+n) is not. In the original grid, A < B is always true, therefor a - b < 0, and 2(x+n) > 0.

 

sorry, b-a.

Teach !!UgZAPoSXEk ID: 68a051 Jan. 28, 2018, 12:04 p.m. No.3491   🗄️.is 🔗kun

>>3490

Can you give me an example of it working for invalid cells?

In our c, a and b are both odd. So they're separated by an even distance. That's the 2 in 2na.

Teach !!UgZAPoSXEk ID: 68a051 Jan. 28, 2018, 12:09 p.m. No.3494   🗄️.is 🔗kun   >>3496 >>3524

Also, is everyone aware that the distance between each 2 consecutive squares is the set of odd numbers?

 

Another way to think about what we're doing is that we're summing a sequence of consecutive odd numbers.

 

Example for c=145.

c = 25 + 27 + 29 + 31 + 33.

The middle of the sequence is b, the number of terms is a. And:

25 = 13^2 - 12^2

27 = 14^2 - 13^2

29 = 15^2 - 14^2

31 = 16^2 - 15^2

33 = 17^2 - 16^2

Teach !!UgZAPoSXEk ID: 68a051 Jan. 28, 2018, 12:11 p.m. No.3495   🗄️.is 🔗kun   >>4100

>>3493

For n = 1, the series of d's, a's, and x's are easily calculable from t. Here's my function, all in terms of t:

 

if (e == 0) {

x = 2*t;

a = 2tt;

d = 2tt + 2*t;

} else if (e % 2 == 1) {

x = 2*t - 1;

d = 2tt + (e-1)/2;

a = 2tt + (e-1)/2 - 2*t + 1;

} else if (e % 2 == 0) {

x = 2*t - 2;

d = 2tt + e/2 - 2*t;

a = 2tt + e/2 - 4*t + 2;

}

Teach !!UgZAPoSXEk ID: 68a051 Jan. 28, 2018, 12:16 p.m. No.3497   🗄️.is 🔗kun   >>3498

>>3496

Could you explain your axis's? I think I get what you're saying, but I'm not sure exactly.

 

You're multiplying a * b in the x and y i'm guessing, but what is z?

Teach !!UgZAPoSXEk ID: 68a051 Jan. 28, 2018, 12:25 p.m. No.3499   🗄️.is 🔗kun   >>3500

>>3498

Gotcha, so you're trying all combinations of e x and n?

 

And in the grid where there are empty cells, the formula still holds is what you're saying?

 

If so, then yes, that makes sense, but it doesn't hinder us by holding true for non-grid cells.

 

The a's & b's in the grid are always the same parity, otherwise, n would not be a whole number. And as I mentioned before, a & b in our case for semi-prime c will always be odd.

Teach !!UgZAPoSXEk ID: 68a051 Jan. 28, 2018, 1 p.m. No.3502   🗄️.is 🔗kun   >>3509

>>3500

Checked!

>>3501

Cool cool :) same page.

 

A pythagorean triplet can be made by:

hypotenuse = b+a

side1 = b-a

side2 = 2ab

 

This all seems connected.

b+a = 2(d+n)

b-a = 2(x+n)

2ab = 2c

Teach !!UgZAPoSXEk ID: 68a051 Jan. 28, 2018, 3:23 p.m. No.3509   🗄️.is 🔗kun

>>3502

My pythagorean triplets equations are wrong, sorry.

 

hypotenuse = b^2+a^2

side1 = b^2 - a^2

side2 = 2ab

 

This makes it a little trickier.

But it may be related to the mod 4 = 2 set of numbers.

Teach !!UgZAPoSXEk ID: 68a051 Jan. 29, 2018, 1:52 p.m. No.3608   🗄️.is 🔗kun   >>3612 >>3618

Good to see you all too!!!

Hello VA, Topol, PMA, CA, MA, Baker, (am i missing anyone).

 

>>3605

d_2 is the divide repeatedly by 2 like VA assumed.

I have one in js you could port:

 

function sqrt(c) {

if (c.isZero()) {

return c;

}

if (c.lesser(4)) {

return BigInt(1);

}

 

var n, p;

var high = c.shiftRight(1);

var low = BigInt.zero;

 

while (high.greater(low.add(1))) {

n = high.add(low).shiftRight(1);

p = n.square();

if (c.lesser(p)) {

high = n;

} else if (c.greater(p)) {

low = n.equals(1) ? n.add(1) : n;

} else {

break;

}

}

if (c.equals(p)) {

return n;

} else if (c.equals(high.square())) {

return high;

}

return low;

}

Teach !!UgZAPoSXEk ID: 68a051 Jan. 29, 2018, 1:53 p.m. No.3609   🗄️.is 🔗kun   >>3611

>>3602

I haven't heard of ete before, I'll check it out.

Unrelated kinda, but I've seen the collatz conjecture represented using that circular tree diagram. Great stuff.

Teach !!UgZAPoSXEk ID: 68a051 Jan. 29, 2018, 2:08 p.m. No.3615   🗄️.is 🔗kun   >>3616

>>3612

Sure is! I freaked out when I saw that Chris had posted.

Even in the tree diagrams there are patterns.

 

Considering we can ultimately express any c breaking it down to its most smallest pieces, then what are those pieces… 1 & 2 I think.

 

Example:

c = 145

c = 12^2 + 1

c = (223)^2 +1

c = (22(1^2 + 2))^2 + 1

c = (22(1^2 + 2*1))^2 + 1

 

Trying to figure out what this means now. But any number can be expressed as a recursive equation in the for:

2^j * (recursive part) + (recursive part)

where each recursive part starts from the root of 1,1.

Moving backwards towards a (or x) though, still unclear.

Teach !!UgZAPoSXEk ID: 68a051 Jan. 29, 2018, 2:32 p.m. No.3617   🗄️.is 🔗kun   >>3624

>>3616

Soooo many patterns…

When this is all over I'm going to post my notebook… I need to go buy another one in fact, filled up a grid book.

Teach !!UgZAPoSXEk ID: 68a051 Jan. 29, 2018, 2:43 p.m. No.3623   🗄️.is 🔗kun   >>3626

Will do, let me fix it - might be a couple of hours sorry (gotta check in with the real world occasionally).

In the meantime, here's some slides from my security lecture, not that its nothing you won't already find on wikipedia or stackoverflow.

Teach !!UgZAPoSXEk ID: 68a051 Jan. 29, 2018, 2:51 p.m. No.3625   🗄️.is 🔗kun

RSA:

Steps to produce private key (n,d) from public key (n, e).

 

1) factor n into 2 primes, p, q

2) compute phi = lowest_common_multiple(p-1,q-1) // euclid algo

3) compute d = modular_inverse(e, phi) // use ext. euclid algo

 

Private key is (n, d).

Teach !!UgZAPoSXEk ID: 68a051 Jan. 29, 2018, 10:17 p.m. No.3684   🗄️.is 🔗kun

Btw, here's my algorithm for calculating private key from 2 primes, written in js, not using BigInts yet. Its very simple.

 

var p = 61;

var q = 53;

var e = 17;

 

var p1q1 = (p-1)*(q-1);

var lcm = (p1q1)/xgcd(p-1, q-1)[2]

var mi = xgcd(e, lcm);

var d = lcm + mi[0];

 

console.log(d)

 

function xgcd(a,b) {

if (b == 0) {

return [1, 0, a];

} else {

temp = xgcd(b, a % b);

x = temp[0];

y = temp[1];

d = temp[2];

return [y, x-y*Math.floor(a/b), d];

}

}

Teach !!UgZAPoSXEk ID: 68a051 Jan. 31, 2018, 7:04 p.m. No.3766   🗄️.is 🔗kun   >>3767 >>3768 >>3769

Ok guys, so it doesn't work for all numbers, but it does for a lot how about this…

 

recurse through the d and e tree, at some point, a d value passed in will be equal to x in our original problem.

so each iteration, calculate gcd(d*d + e, orig_c) for each branch of the tree.

 

Like I said, it doesn't work for all values of c, but it relies on the xx+e = 2na & dd+e = ab common factor of a.

 

I'm trying to figure out the cases when it doesn't work, and trying to solve those cases individually.

 

I'm also going to write up a big int version and test on some larger numbers.

Teach !!UgZAPoSXEk ID: 68a051 Jan. 31, 2018, 7:10 p.m. No.3769   🗄️.is 🔗kun   >>3770 >>3771

>>3766

Correction, gcd(d*d + orig_e, orig_c), sorry math is hard

 

>>3767

You'll know because gcd will be greater than 1.

 

>>3768

At the moment, i'm missing several cases, since i'm not testing the 2's we're extracting, or the root of the perfect squares - going to do that next.

But I'm testing each and every d/2 value on the way down, yes.

Teach !!UgZAPoSXEk ID: 68a051 Jan. 31, 2018, 10:29 p.m. No.3785   🗄️.is 🔗kun   >>3791

>>3782

Hey anon, will you do a walk-through with a non-perfect square this time?

I re-read your post, and I'm in agreement with everything you said, just want to see a non-perfect square example, and if it works, i'll code it up.

Teach !!UgZAPoSXEk ID: 68a051 Feb. 3, 2018, 7:58 p.m. No.3909   🗄️.is 🔗kun   >>3910 >>3971

I've been building a tool to help me visualize the trees and test different theories…

 

Its code is not ready to share yet, but I'm going to clean it up and share it when its ready.

 

Using electron + node.

Teach !!UgZAPoSXEk ID: 68a051 Feb. 3, 2018, 9:48 p.m. No.3911   🗄️.is 🔗kun   >>3912

>>3910

So far its on small ints only.

I just added traditional slow factoring to find a & b and calculate the grid values given a & b.

So I've added the grid to the view now.

Teach !!UgZAPoSXEk ID: 68a051 Feb. 3, 2018, 9:53 p.m. No.3912   🗄️.is 🔗kun   >>3913

>>3911

I'm also currently developing a ruleset to test the climbing back up the tree.

There are some interesting things I've seen so far, such as when you divide by 4.

 

c = ab = d^2+e

4c = (2d)^2 + 4e

 

It appears that you can also calculate movement by 2, but you end up with n ending in 0.5

 

It seems for calculating x for combining the perfect squares is pretty simple too, as is gcd, since you get a factor out which gives you x and n.

 

The last remaining rule is the dd+e.

So far, I'm seeing patterns around if e is even or odd, and if so, x is an addition of d+e in some cases. Something like that. Simple d+e addition is the point i'm making.

Teach !!UgZAPoSXEk ID: 68a051 Feb. 3, 2018, 11 p.m. No.3917   🗄️.is 🔗kun   >>3918 >>3945

Looking at my own drawing… is na always a triangle number?

 

c = (d+n)^2 - (x+n)^2

c = (d^2 + 2nd + n^2) - (x^2 + 2xn + n^2)

c = (d^2 + 2nd) - (x^2 + 2xn)

c = d^2 - x^2 + 2n(d-x)

c = d^2 - x^2 + 2na

 

>>3915

In this diagram, d is the small dotted square. d+n is the large dotted square.

The area above d+n fits into the area between d and d+n on both the top and the side.

Hence 2 * na.

 

It seems na is going to be a triangle number.

 

Double check my thinking guys?

Teach !!UgZAPoSXEk ID: 68a051 Feb. 3, 2018, 11:20 p.m. No.3923   🗄️.is 🔗kun

Sorry, yeah, I've got my math wrong… still correct on concepts, wrong variables…

 

I there is something here though.

Will update soon.

Teach !!UgZAPoSXEk ID: 68a051 Feb. 3, 2018, 11:53 p.m. No.3925   🗄️.is 🔗kun   >>3926

Not sure if this was already said before, but:

 

ab + △a + △b = △(a+b)

Example:

c = 145

a = 5

b = 29

△a = 15

△b = 435

ab+△a+△b = 595

 

solve quadratically:

595 = n(n+1)/2

n = 34

△34 = 595 = △(a+b)

Teach !!UgZAPoSXEk ID: 68a051 Feb. 4, 2018, 12:05 a.m. No.3927   🗄️.is 🔗kun   >>3928

>>3926

This is what I've got so far, very interesting…

 

c, the difference of 2 squares, is also the difference of 2 triangles.

 

Our equations in terms of triangle differences is:

 

c = △(((b-1)/2)+a) - △(((b-1)/2)-a)

 

Another example for clarity:

c = 145

a = 5

b = 29

(b-1)/2 = 14

(b-1)/2 + a = 19

(b-1)/2 - a = 9

△19 = (19*20)/2 = 190

△9 = (9*10)/2 = 45

 

△(((b-1)/2)+a) - △(((b-1)/2)-a) = 190 - 45

△(((b-1)/2)+a) - △(((b-1)/2)-a) = 145

△(((b-1)/2)+a) - △(((b-1)/2)-a) = c

Teach !!UgZAPoSXEk ID: 68a051 Feb. 4, 2018, 12:17 a.m. No.3930   🗄️.is 🔗kun

>>3928

This is all bloody beautiful.

 

Squares can be added an subtracted via their associated triangles.

You can define a triangle number as either a square - a smaller triangle, or as a square + 2 smaller triangles.

This is the missing piece I've been searching for for weeks.

For a while I've had a hunch that we're representing c as dd+e because its like a new number system. Just like we can add i to the integers or rationals or irrationals even, and get complex numbers.

I was looking for a way to add, subtract and multiply squares and errors (dd+e), and its possible via triangles!!!

Teach !!UgZAPoSXEk ID: 68a051 Feb. 4, 2018, 12:51 a.m. No.3931   🗄️.is 🔗kun   >>3937

Another comment, since I'm on a roll tonight.

I've been playing with using an alternative to f.

So instead of using d+1 to get f, I've been using d-1.

I'm doing this whenever e is odd and d is even, so that e will be even when d-1 is odd.

The reason for this is so that I have enough error to put on either sides of my square.

Teach !!UgZAPoSXEk ID: 68a051 Feb. 4, 2018, 9:48 a.m. No.3951   🗄️.is 🔗kun   >>3952 >>3953

>>3947

>>3949

>>3950

Thanks MA.

 

Taking the c = 145 example, I'm not sure if this works for all numbers, or only 145 because n=a, but assuming the answer:

c = 145, a = 5, b = 29

d = 12, e = 1

n = 5, x = 7

 

d^2 - x^2 + 2na = 12^2 - 7^2 + 2(5)(5)

 

so focusing on 2na = 25, and using the diagrams I've shared above, you can know some things about na.

 

I think its something like:

2na = 2n + △a

or

2na = 2a + △a

(not sure yet since n = a)

 

Using our example:

△a = △5 = 15

25 - 15 = 10 = 2(5)

 

10 is a triangle number too, but I'm not sure if this is a coincidence.

 

I'm working now on describing x+n in triangles too. I think there's a relationship.

 

Think about this…

c = (d+n)^2 - (x+n)^2

(d+n) = 17

(x+n) = 12

(d+n)^2 = △17 + △16

(x+n)^2 = △12 + △11

c = (△17 + △16) - (△12 + △11)

c = (△17 - △11) + (△16 - △12)

 

Any time you have △-△, you also have square - square, so the pattern repeats.

 

Thats what I've got so far.

 

I'm also working on a process for adding 2 triangle numbers, if you know anything about that, I'm all ears!

Teach !!UgZAPoSXEk ID: 68a051 Feb. 4, 2018, 10:55 p.m. No.3974   🗄️.is 🔗kun   >>3975

>>3973

Want me to run any numbers?

I'm down to share my code too. I think its ready to be packaged up, just gotta figure out where to post it to share. Its really really big.

Teach !!UgZAPoSXEk ID: 68a051 Feb. 5, 2018, 11:55 a.m. No.4001   🗄️.is 🔗kun   >>4003

I don't mean to distract from the triangle numbers, and our current tree theories, but I was going back through the original crumbs, and found this one:

 

>At the correct element in the grid at (e,1) where the value of a at that element equals the na we want, if you subtract 2d+1 from na then you are in the negative half of the grid in terms of e and the value at the same element in the first row will be (n-1)a

 

Re-reading this crumb, and looking at the grid, at (f, 1), there is an a that = (n-1)a.

For 145, this is our value 20, and when we add d to 20, in (e,1) we'll find d=32 & a=25.

 

These two numbers are connected via x.

The x for f is 1 more than the x for e.

 

More than that too, it seems that the x at (f, 1) shares a common factor with the original d.

 

I'm going to try to use this info to roll up the tree.

We know how to generate d, x, and a for (e,1) or (f,1).

We know the relationship between x's and factors of x in (f,1), and so hopefully there's a way to mathematically solve the a's for e and f using simultaneous equations.

 

Also, regarding sharing my code. I fell asleep last night so I'll package it up and share it today.

Teach !!UgZAPoSXEk ID: 68a051 Feb. 5, 2018, 12:05 p.m. No.4003   🗄️.is 🔗kun   >>4006 >>4008

>>3993

You're right. These numbers are not officially in the grid, I was just trying to understand patterns.

 

One thing that Chris said was that this process finds the 2 factors that are closest together, ie, smallest n.

 

For this reason, I've made my slow_factor method return precisely these factors.

 

I like your idea of treating d as 2d. I'm not quite there yet as to understand why and precisely how. But I see your point.

 

>>4001

If you get a chance today PMA, I know you can generate d,x,a for n=1, check out this post and tell me what you think.