Problem 167

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.
petrw1
Posts: 7
Joined: Mon Jan 21, 2008 10:02 pm

Clarification on Problem 167

Post by petrw1 »

Find [sum]U(2,2n+1)1e11 for 2 [le] n [le]10.

What does 1e11 mean?
Do I generate each of these 9 sequences up to e^11 and add up all the terms of all the sequences?
e^11 is about 59, 874. Seems to be an odd upper limit?
User avatar
stijn263
Posts: 1505
Joined: Sat Sep 15, 2007 11:57 pm
Location: Netherlands

Re: Clarification on Problem 167

Post by stijn263 »

1e11 = 1011 = 100,000,000,000

In most programming languages either 10^11 or 10**11
JohnMorris
Posts: 64
Joined: Sun Dec 23, 2007 6:38 am

Re: Clarification on Problem 167

Post by JohnMorris »

1e11 means 1 times 10 to the 11'th power, which is 100,000,000,000
Image
User avatar
hk
Administrator
Posts: 12831
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Clarification on Problem 167

Post by hk »

henk263 wrote:1e11 = 1011 = 100,000,000,000

In most programming languages either 10^11 or 10**11
Or simply 1e11
Image
War ruins the life and health of untold numbers of innocent children.
User avatar
stijn263
Posts: 1505
Joined: Sat Sep 15, 2007 11:57 pm
Location: Netherlands

Re: Clarification on Problem 167

Post by stijn263 »

In Maple, 1e11 is a double, whereas 10^11 is an integer (and thus has infinite/arbitrary precision)

That's also how I learned it in school, 1e11 means you only have 1 significant digit.
User avatar
hk
Administrator
Posts: 12831
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Clarification on Problem 167

Post by hk »

In Delphi neither 10^11 nor 10**11 exist.
One can however assign the constant 1e11 (having extended precision) to an int64 variable by truncating it.
Image
War ruins the life and health of untold numbers of innocent children.
User avatar
daniel.is.fischer
Posts: 2400
Joined: Sun Sep 02, 2007 11:15 pm
Location: Bremen, Germany

Re: Clarification on Problem 167

Post by daniel.is.fischer »

henk263 wrote:1e11 = 1011 = 100,000,000,000

In most programming languages either 10^11 or 10**11
Well, usually the 'e' form (aka scientific notation) is used in source code to denote values or by the language to display values, while (^) and (**) are functions (in C and related languages it's pow(x,y), a^b is bitwise XOR).
In Haskell, you have three exponentiation operators:
Prelude> :t (^)
(^) :: (Integral b, Num a) => a -> b -> a
Prelude> :t (^^)
(^^) :: (Integral b, Fractional a) => a -> b -> a
Prelude> :t (**)
(**) :: (Floating a) => a -> a -> a
Il faut respecter la montagne -- c'est pourquoi les gypaètes sont là.
User avatar
hk
Administrator
Posts: 12831
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Clarification on Problem 167

Post by hk »

By the way: in the problem statement 1e11 is used because otherwise we would have an index with an exponent in it.
I'm not sure this would lead to readable page rendering but I could try to change it to 1011 and revert it back if it does not render well.
Image
War ruins the life and health of untold numbers of innocent children.
User avatar
hk
Administrator
Posts: 12831
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Clarification on Problem 167

Post by hk »

I changed it, what do we think?
Image
War ruins the life and health of untold numbers of innocent children.
User avatar
daniel.is.fischer
Posts: 2400
Joined: Sun Sep 02, 2007 11:15 pm
Location: Bremen, Germany

Re: Clarification on Problem 167

Post by daniel.is.fischer »

Looks nice enough. Due to the smaller font for sub- and superscripts, it should be unambiguously parseable (hopefully).
Il faut respecter la montagne -- c'est pourquoi les gypaètes sont là.
User avatar
Georg
Posts: 157
Joined: Mon Jan 21, 2008 7:00 am
Location: Mannheim, Germany
Contact:

Re: Clarification on Problem 167

Post by Georg »

I think it could look better using k as index and let k = 1011:
...)k for 2 [le] n [le]10, k = 1011
User avatar
hk
Administrator
Posts: 12831
Joined: Sun Mar 26, 2006 10:34 am
Location: Haren, Netherlands

Re: Clarification on Problem 167

Post by hk »

Changed that.
Image
War ruins the life and health of untold numbers of innocent children.
User avatar
daniel.is.fischer
Posts: 2400
Joined: Sun Sep 02, 2007 11:15 pm
Location: Bremen, Germany

Re: Clarification on Problem 167

Post by daniel.is.fischer »

Restored now :)
Il faut respecter la montagne -- c'est pourquoi les gypaètes sont là.
petrw1
Posts: 7
Joined: Mon Jan 21, 2008 10:02 pm

Re: Clarification on Problem 167

Post by petrw1 »

Thanks for the speedy replies.
I should have realized that "e" in this context means exponent not the Log "e".
LarryC

Problem 167

Post by LarryC »

Hi!

I'm on Problem 167 as the title suggests and I think I have found what I need to do. Can anyone confirm that for n = 2, the correct value is ??????????? That would be a great checking aid!

Thanks,
Lster
Last edited by LarryC on Wed Jul 09, 2008 2:41 pm, edited 1 time in total.
User avatar
Tommy137
Posts: 238
Joined: Sun Feb 24, 2008 6:02 pm
Location: Cologne, Germany
Contact:

Re: Problem 167

Post by Tommy137 »

Yes, it's correct.
Image
LarryC

Re: Problem 167

Post by LarryC »

Thank you! :)

This one is one that has been giving me long-term problems!
User avatar
stijn263
Posts: 1505
Joined: Sat Sep 15, 2007 11:57 pm
Location: Netherlands

Re: Problem 167

Post by stijn263 »

Yup it's a tough one, but lots of fun to solve :D
LarryC

Re: Problem 167

Post by LarryC »

Yup it's a tough one, but lots of fun to solve :D
Well, I'm pretty sure I have the answer for n=2 to 9 correct. But now need to sum for n=10 - which is causing quite some hassle!
LarryC

Re: Problem 167

Post by LarryC »

One last thing, for n=3, is the result ????????? I have a worry that I may just be lucky on the first value, and n=3 seems a little different because... ;)
Last edited by LarryC on Wed Jul 09, 2008 5:24 pm, edited 1 time in total.
Post Reply