Search found 545 matches

by jaap
Sun Mar 06, 2016 11:38 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 060
Replies: 40
Views: 17969

Re: Problem #60

Tommy137 was pointing out exactly that - the inequalities that DiogoRegateiro was using while searching for a set of 5 primes were invalid. By using the counterexample of 5 consecutive primes (consecutive so that they are approximately the same size) he showed that four of them would certainly be la...
by jaap
Thu Mar 03, 2016 9:32 am
Forum: News, Suggestions, and FAQ
Topic: Errors/Warnings/Bugs
Replies: 577
Views: 166226

Re: Errors/Warnings/Bugs

Another:
Problem 547 (View Problem)
"For n = 3 there exits only one" -> "For n = 3 there exists only one "
by jaap
Fri Feb 26, 2016 9:32 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 089
Replies: 67
Views: 26592

Re: Problem 089

Anyway I take the points about the problem not being clear so I have updated the problem statement and expanded the information on the "About... Roman Numerals" page to make, I hope, everything clearer. Reading through the rules, I didn't realize at first that rule 2 applies even to X's that don't ...
by jaap
Fri Feb 19, 2016 4:49 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 386
Replies: 15
Views: 7030

Re: Problem 386

The first line says Let ...S(n) be the set of factors of n. Then, a few lines lower: For example: S(30) = {1, 2, 3, 5, 6, 10, 15, 30} \ Are the factors of 30 not {2,3,5} ? Shouldn't the first line say: divisors ? Factor and Divisor mean the same thing in this context. {2,3,5} are the prime factors ...
by jaap
Tue Jan 12, 2016 9:17 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 043
Replies: 8
Views: 3392

Re: Problem 043

1) This is nothing to do with the pandigital property - you're told 'number', and by definition numbers simply cannot have leading zeroes. It seems to me that your statement is simply not compatible with the description of the problem. As you can see from the problem statement itself, 063 is clearl...
by jaap
Tue Jan 05, 2016 7:21 am
Forum: Number
Topic: Palindromic Repetitions
Replies: 4
Views: 10748

Re: Palindromic Repetitions

See also:
http://mathworld.wolfram.com/Palindromi ... cture.html
(Note: contains spoiler for the problem in the OP)
by jaap
Sun Dec 27, 2015 12:32 pm
Forum: Recreational
Topic: Showing how many problems you've solved.
Replies: 12
Views: 7098

Re: Showing how many problems you've solved.

Like most of the stats pages on PE, they are not instantly updated when you solve a problem. It can take an hour or so for everything to be made up to date.
by jaap
Tue Dec 15, 2015 7:28 am
Forum: Number Theory
Topic: Flag without an IF condition
Replies: 9
Views: 9204

Re: Flag without an IF condition

Thanks v6ph1 for the suggestions. Linear recurrence is the one I was looking for I suppose. Can you please explain your first and second option with examples? I cant understand them. Thanks. Presumably something like this: int i,x,s; for( i=0; i<100; i++){ x=i%6; s = ((((6*x - 75)*x + 320)*x - 525)...
by jaap
Sun Nov 01, 2015 4:21 am
Forum: News, Suggestions, and FAQ
Topic: Can't get the overviews to the problems
Replies: 2
Views: 1012

Re: Can't get the overviews to the problems

Problems 8, 11, 13, 14 do not have an overview. They simply have not been written. After problem 15, very few problems have an overview.

If you are able and willing to write such an overview for any problem that does not have one, I'm sure the PE team will appreciate the help.
by jaap
Sat Oct 31, 2015 6:43 pm
Forum: Discrete Mathematics
Topic: How to prove graph also has a cycle of length a + b-2.
Replies: 2
Views: 6527

Re: How to prove graph also has a cycle of length a + b-2.

If you draw a sketch of the situation, it will become really obvious.
by jaap
Thu Oct 29, 2015 2:16 am
Forum: Clarifications on Project Euler Problems
Topic: Problem 531
Replies: 10
Views: 5274

Re: Problem 531

mod in this context is not an operator. It is not the same thing as the % operator. The equation should really have used the ≡ symbol, meaning "is congruent to", instead of =. See for example 123 . The modular equation x≡a modulo n means that x and a have the same residues modulo n, i.e. the same re...
by jaap
Thu Oct 01, 2015 1:36 pm
Forum: Combinatorics
Topic: Sum of products of n-tuples
Replies: 3
Views: 9416

Re: Sum of products of n-tuples

Isn't it just this?
Expand
(a1+a2+a3+..+an)*(b1+b2+...+bn)*(c1+c2+...+cn)
by jaap
Wed Sep 30, 2015 7:09 am
Forum: Discrete Mathematics
Topic: Counting Subtrees
Replies: 9
Views: 10508

Re: Counting Subtrees

Unfortunately that sequence (including the 16th term) is a bit too easy to find in the OEIS, which in turn links to the extensive stackexchange discussion that generated the sequence.
by jaap
Thu Sep 10, 2015 3:06 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 524
Replies: 4
Views: 2202

Re: Problem 524

Just to be absolutely clear: the lexicographic order for the numbers from 1 to 20 is 1,10,11,12,13,14,15,16,17,18,19,2,20,3,4,5,6,7,8,9. Do we agree?? No. Think of each number in a list as a single letter in a word. (2,3,4)<(10,1,1)<(10,1,2)<(10,4,1)<(11,3,3)<(104,1,2)<(1030,0,0) Each 'coordinate' ...
by jaap
Mon Aug 03, 2015 5:06 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 093
Replies: 54
Views: 19698

Re: Problem 093

Yes, see the fourth example where * has been used more than once. Seems like I did not understand the problem clearly. It says ".... it is possible to obtain thirty-one different target numbers .... and each of the numbers 1 to 28 can be obtained before encountering the first non-expressible number...
by jaap
Tue Jul 28, 2015 3:40 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 149
Replies: 37
Views: 14097

Re: Problem 149

I've been trying to squeeze the correct values out of that LFG. I am getting s[10] correctly, but for some weird reason s[100] is always -357419. I don't think there's an overflow. What could possibly go wrong with s[k] = ((s[k-24] + s[k-55] + 1000000) mod 1000000) - 500000? Could someone be so kin...
by jaap
Sun Jul 19, 2015 11:47 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 005
Replies: 49
Views: 17941

Re: Problem 005

evenly divisible is NOT the same as divisible http://dictionary.reference.com/browse/divisible Look at definition 2a. You were saying? Evenly divisible means it is divisible and the quotient is EVEN. No it doesn't. That is only how you mis-interpreted it. It means it is divided into equal parts. He...
by jaap
Fri Jul 17, 2015 12:18 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 017
Replies: 83
Views: 29085

Re: Problem 017

Can someone British please clarify how they use "and"? I know this have been beaten to death, but the problem formulation is not clear. I have no beef with British English, but the problem clearly is not "foreigner proof" 8-) My solution is off by 27, which is a multiple of 3 and I suspect that mea...
by jaap
Fri Jul 03, 2015 10:13 am
Forum: Recreational
Topic: Programming Puzzle :: No ifs, abs, or buts!
Replies: 1
Views: 2208

Re: Programming Puzzle :: No ifs, abs, or buts!

The smart-arse answer is: just return {A,B} Sets don't have any order to them, so {A,B}={B,A} and this must equal {C,D} regardless of which number is the larger. So let's assume you mean the function to return the ordered pair (C,D). If you know one of C or D, then the other is trivial to deduce fro...
by jaap
Fri Jun 26, 2015 12:13 pm
Forum: Clarifications on Project Euler Problems
Topic: Problem 056
Replies: 12
Views: 4222

Re: Problem 056

Do natural numbers include number zero as well? I googled the definition of natural numbers and this is what I found: noun the positive integers (whole numbers) 1, 2, 3, etc., and sometimes zero as well. Do you think including or excluding zero will make a difference to the answer of the problem?