138  Street Numbers
Moderator: Board moderators
Problem 138
Hy!
There are a relantionship between [6 , 8] and [35, 49]
? I tried to find but I didn't get it.
If I find it, I will generate the other numbers in a easy way.
Thanks,
Charla
There are a relantionship between [6 , 8] and [35, 49]
? I tried to find but I didn't get it.
If I find it, I will generate the other numbers in a easy way.
Thanks,
Charla

 New poster
 Posts: 6
 Joined: Tue Dec 02, 2003 6:43 am
 Contact:
Problem 138  Pell's Formula
Hy!
How can I generate the next pair of numbers using the Pell's Formula
(if it is possible, of course.)?
Thanks,
Charlla
How can I generate the next pair of numbers using the Pell's Formula
(if it is possible, of course.)?
Thanks,
Charlla

 Experienced poster
 Posts: 131
 Joined: Thu Apr 17, 2003 8:39 am
 Location: Baku, Azerbaijan
138  Understanding
Hy!
I understood the relation 1 + 2 + ... + (n1) = (n+1) + (n+2) + ... + ,m
that you said. But, how can I "guess" that after 6, the next number should
be 35?
Thanks,
Charlla
==========
I understood the relation 1 + 2 + ... + (n1) = (n+1) + (n+2) + ... + ,m
that you said. But, how can I "guess" that after 6, the next number should
be 35?
Thanks,
Charlla
==========
Nikolay Archak wrote:Hi!
I can give you a hint if you want.
You should find first 10 pairs of numbers n, m with a property
that 1 + 2 + ... + (n1) = (n+1) + (n+2) + ... + ,m
For example, 1 + ... + 5 = 7 + 8 = 15.
Here, n corresponds to the programmer house number and m to the maximum house number on this street.
Problem 138  Pell's Equation
Hy!
Thanks a lot. I'll try.
Charlla

Thanks a lot. I'll try.
Charlla

yiuyuho wrote:you'll have to spot the pattern.
There is a 2 parameter recursion I know that works, but I dunno why.
Furthermore, you can look into pell's equation, you can transform the problem into pell's equation and use the algorithm for pell to do it. you can google pell, I do not familiar with the details.

 New poster
 Posts: 45
 Joined: Mon Jul 14, 2003 9:42 pm
 Location: Zoetermeer, The Netherlands
Hi all,
In case you're not sure whether your solution is correct, or just plain want to know some examples, here are the first 12 solutions.
I have omitted solution 10 to prevent people from simply sending in this list.
In case you're not sure whether your solution is correct, or just plain want to know some examples, here are the first 12 solutions.
I have omitted solution 10 to prevent people from simply sending in this list.
Code: Select all
6 8
35 49
204 288
1189 1681
6930 9800
40391 57121
235416 332928
1372105 1940449
7997214 11309768
........ ........
271669860 384199200
1583407981 2239277041
138  Steet numbers
I need help from people's whos have linux and same compiler like OJ. plz write output for this program, becouse i get that output on my win98 with devc++(orginal compiler):
[output removed]
And there is code:
Best Regards Rav
[output removed]
And there is code:
Code: Select all
code removed by Jan
Rafał Sokołowski

 Experienced poster
 Posts: 106
 Joined: Thu Jan 29, 2004 12:07 pm
 Location: Bangladesh
 Contact:
Re: 138  Steet numbers
I think you need long long.. not long intRav wrote:I need help from people's whos have linux and same compiler like OJ. plz write output for this program, becouse i get that output on my win98 with devc++(orginal compiler):
[output removed]
And there is code:
Best Regards RavCode: Select all
code removed by Jan
138 the Math way.
Greetings!.
What's the Math way to do this problem?.
I work with Pascal, and I made it adding and testing, but it takes so much time (even with (a+b)*(ba+1)/2 will take too long).
What formulas can be used?.
Thanks in advance.
What's the Math way to do this problem?.
I work with Pascal, and I made it adding and testing, but it takes so much time (even with (a+b)*(ba+1)/2 will take too long).
What formulas can be used?.
Thanks in advance.
_.
Re: 138 the Math way.
I think the maths formula is already posted somewhere on this forum.. just do a search for it. Alternatively, go to the main page (acm.uva.es/problemset) and then scroll to the bottom. Visit Steven Halim's website. The answer is on there somewhere as well._.B._ wrote:Greetings!.
What's the Math way to do this problem?.
I work with Pascal, and I made it adding and testing, but it takes so much time (even with (a+b)*(ba+1)/2 will take too long).
What formulas can be used?.
Thanks in advance.