Sorry, an error occurred while loading the content.
Browse Groups

• ## Re: [PrimeNumbers] Re: A Property

(64)
• NextPrevious
• - I have designed a new (i think it is new) and quite simple compression algorithm which can compress a string of ANY length into a string of 666 bytes (using
Message 1 of 64 , Oct 21, 2005
View Source
- I have designed a new (i think it is new) and quite simple compression
algorithm which can compress a string of ANY length into a string
of 666 bytes (using the well-known fact that 36 n^2 - 666 n + 1277 is prime
for all n between 0 and 42,inclusive )(1)

- I'm currently working on the corresponding decompression algorithm ...

(1)
-> for(n=0;n<=42;n++) {p = 36*n**2 - 666*n +1277; println(n,p,isprime(p));}

0 1277 2
1 647 2
2 89 2
3 -397 2
4 -811 2
5 -1153 2
6 -1423 2
7 -1621 2
8 -1747 2
9 -1801 2
10 -1783 2
11 -1693 2
12 -1531 2
13 -1297 2
14 -991 2
15 -613 2
16 -163 2
17 359 2
18 953 2
19 1619 2
20 2357 2
21 3167 2
22 4049 2
23 5003 2
24 6029 2
25 7127 2
26 8297 2
27 9539 2
28 10853 2
29 12239 2
30 13697 2
31 15227 2
32 16829 2
33 18503 2
34 20249 2
35 22067 2
36 23957 2
37 25919 2
38 27953 2
39 30059 2
40 32237 2
41 34487 2
42 36809 2
-------------------------------------
http://www.echolalie.com
-------------------------------------
• ... Thank you David. I had been confused by consideration of the following: if x y = z and y x, then if we set t = (y+x)/2 and s = (y-x)/2 then z = t^2 - s^2
Message 64 of 64 , Oct 20, 2012
View Source
On 10/20/2012 10:07 AM, primenumbers@yahoogroups.com wrote:
> 2.2. Re: Question
> Posted by: "djbroadhurst"d.broadhurst@... djbroadhurst
> Date: Fri Oct 19, 2012 9:02 am ((PDT))
>
>
>
> --- Inprimenumbers@yahoogroups.com,
> Kermit Rose<kermit@...> wrote:
>
>> >Methods to solve Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0
>> >
>> >for what values of x would
>> >x^2 + 5 x + 6 be a perfect square.
> Set A = 1, B = 0, C = -1, D = 5, E = 0, F = 6.
>
> and you will get the obvious answer from Dario:
>
> x = -2
> y = 0
> and also:
> x = -3
> y = 0
> Calculation time: 0h 0m 0s
>
> David

Thank you David.

I had been confused by consideration of the following:

if x y = z and y > x,
then if we set t = (y+x)/2 and s = (y-x)/2

then z = t^2 - s^2
and x = y - 2 t.

So z = x y = (y - 2t) y = y^2 - 2 t y

y^2 - 2 t y - z = 0

Transforming w = y - k yields

(w + k)^2 - 2 t (w + k) - z = 0

w^2 + (2 k - 2 t) w + (k^2 - 2 t k - z) = 0

which has integral solution if and only if

(2k - 2 t)^2 + (z + 2 t k - k^2) is an integral square

In all that derivation, I forgot that I still did not know what value t was.

I confused myself too easily.

Kermit

[Non-text portions of this message have been removed]
Your message has been successfully submitted and would be delivered to recipients shortly.
• Changes have not been saved
Press OK to abandon changes or Cancel to continue editing
• Your browser is not supported
Kindly note that Groups does not support 7.0 or earlier versions of Internet Explorer. We recommend upgrading to the latest Internet Explorer, Google Chrome, or Firefox. If you are using IE 9 or later, make sure you turn off Compatibility View.