Problem 141

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you
are requested to be thoughtful in not posting anything
that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
axelbrz
Posts: 51
Joined: Mon Sep 08, 2008 5:34 am

Problem 141

Post by axelbrz »

Hi! I'm trying to resolve the problem 141.

It says that the sum of all progressive perfect squares below one hundred thousand is 124657, but I'm not getting that sum, I can't get more numbers than these: 9, 10404 (<-- both on the problem) and XXXXX.

Can someone give me another progressive perfect square number below 100,000 with d, q and r numbers?

Thanks!

Axel.
Last edited by daniel.is.fischer on Mon Oct 27, 2008 5:24 am, edited 1 time in total.
Reason: Remove hint
"think(O(n))+O(n) sometimes is better than think(O(1))+O(1)"

Image
User avatar
daniel.is.fischer
Posts: 2400
Joined: Sun Sep 02, 2007 11:15 pm
Location: Bremen, Germany

Re: Problem 141

Post by daniel.is.fischer »

There's one more than you found. You can determine the square, d, q and r from that.
Il faut respecter la montagne -- c'est pourquoi les gypa&egrave;tes sont l&agrave;.
axelbrz
Posts: 51
Joined: Mon Sep 08, 2008 5:34 am

Re: Problem 141

Post by axelbrz »

Yeah, I've found it, I were to delete my post :)

But you've answered, so thanks!
"think(O(n))+O(n) sometimes is better than think(O(1))+O(1)"

Image
estanford
Posts: 10
Joined: Sun Sep 13, 2009 12:06 pm

Re: Problem 141

Post by estanford »

I just made a post in the solution forum for this problem that I think Euler (or anyone else responsible for curating the problem sets) should read.
User avatar
hk
Administrator
Posts: 10984
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 141

Post by hk »

Post read and commented upon.
Image
User avatar
Lord_Farin
Posts: 239
Joined: Wed Jul 01, 2009 10:43 am
Location: Netherlands

Re: Problem 141

Post by Lord_Farin »

After debugging my code for hours, I verified the perfect squares I found are progressive, that there are no overflow problems, and that my bounds are exact. However, the answer my code returns is wrong. I will be not as naive as to state the answer in the database is wrong, but I seriously am out of debugging ideas now. Moreover, since my algo returns correct squares, I am convinced it is correct.

Is there anybody willing to go through my code to see if there is something I overlooked?
Image
TripleM
Posts: 382
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 141

Post by TripleM »

Sure.
maomaoloverose
Posts: 4
Joined: Thu Feb 24, 2011 9:23 am

Re: Problem 141

Post by maomaoloverose »

I have the same trouble. Maybe, i got a wrong formula.

Can someone give me another progressive perfect square number below 100,000(I got only three numbers: 9, 10404 and 1xxxx :( ).
Image
User avatar
GenePeer
Posts: 112
Joined: Sat Apr 03, 2010 1:14 pm
Contact:

Re: Problem 141

Post by GenePeer »

The problem statement gives their sum, and you have three already. There are four; you can deduce the fourth from that.
Image
maomaoloverose
Posts: 4
Joined: Thu Feb 24, 2011 9:23 am

Re: Problem 141

Post by maomaoloverose »

Now, i got ten numbers, but it's still wrong. I got two formula, i can't post them here.

so, can someone check my algorithm?
Image
User avatar
GenePeer
Posts: 112
Joined: Sat Apr 03, 2010 1:14 pm
Contact:

Re: Problem 141

Post by GenePeer »

There are a lot more than just ten numbers. You are probably making generalisations just from observing patterns, which you can not absolutely justify. That would explain why you are missing numbers. Try and think it through again. For n to be a square, what forms must q,d, & r take? What is the size of the search-space?
Image
oleglyamin
Posts: 38
Joined: Mon Aug 08, 2011 8:49 am

Re: Problem 141

Post by oleglyamin »

I've run into some minor problem with my algorithm.
Help me debug it, please.

There is a progressive perfect square close to 10^5, but less than it.
Could you tell me common ratio of the geometric sequence corresponding to this number?

Thanks.

UPDATE: Don't bother - I found it.
User avatar
jake223
Posts: 57
Joined: Mon Apr 25, 2011 5:15 am
Location: USA
Contact:

Re: Problem 141

Post by jake223 »

I get thirteen possible values for n, which add up to a number between five hundred million and one billion that ends in 37. My answer is wrong, but I get the right answer for the 10000 case. Am I way under, or is there something I may be doing wrong?
Image
thundre
Posts: 356
Joined: Sun Mar 27, 2011 10:01 am

Re: Problem 141

Post by thundre »

jake223 wrote:I get thirteen possible values for n, which add up to a number between five hundred million and one billion that ends in 37. My answer is wrong, but I get the right answer for the 10000 case. Am I way under, or is there something I may be doing wrong?
That would be the right answer if the upper limit were one billion.
But the upper limit in this problem is one trillion (1012).
Image
Erf_Erf
Posts: 5
Joined: Sun Jan 12, 2014 12:12 pm

Re: Problem 141

Post by Erf_Erf »

I get the correct answer for 10^5, but not for 10^12. I guess it could have something to do with low integer precision. Are the following values correct?

10^6: 700738
10^8: 171436696
10^10: 23261047907
Image
User avatar
nicolas.patrois
Posts: 118
Joined: Fri Jul 26, 2013 4:54 pm
Contact:

Re: Problem 141

Post by nicolas.patrois »

Erf_Erf wrote: 10^6: 700738
10^8: 171436696
10^10: 23261047907
Yes.
Yes.
No.
Image
fabianlischka
Posts: 2
Joined: Mon Mar 31, 2014 10:43 am

Re: Problem 141

Post by fabianlischka »

[deleted]
Last edited by fabianlischka on Sat Apr 05, 2014 9:48 am, edited 1 time in total.
User avatar
hk
Administrator
Posts: 10984
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Problem 141

Post by hk »

@Fabianlischka:
The caption of this forum reads:
"A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions."
So it's not a place to give hints nobody has been asking for.
Image
fabianlischka
Posts: 2
Joined: Mon Mar 31, 2014 10:43 am

Re: Problem 141

Post by fabianlischka »

@hk - noted! :-)
larryleinweber
Posts: 4
Joined: Sat Sep 20, 2014 4:51 pm

Problem 141 English

Post by larryleinweber »

The title of problem 141 is "Investigating progressive numbers, n, which are also square" but probably should be "Investigating progressive numbers that are perfect squares." The symbol "n" is irrelevant to the title. The word "which" implies that the quality of being square is incidental to the problem. The world "also" would make more sense if the title with "Investigating numbers that are progressive and also square."

The word "which" is used in many other problems where "that" would be more accurate.
Post Reply