- 20,782
- 28,288
125. Find an integer which can be written as a sum of squares in three different ways.
D124
D124
fresh_42 said:125. Find an integer which can be written as a sum of squares in three different ways.
D124
K S1 S2 S3 S4
0 k n-k 0 0
k-2 0 n-k 1 1
n-4 0 0 2 2
n-4 1 0 0 3
n-3 2 1 0 0
I'm confused by that one. ##\varphi(x)## is odd for x=1 and x=2 only, giving us two choices for the first number. No odd value apart from 1 occurs in its range (and various even numbers don't occur either), giving an infinite set of choices. The torus needs 7 colors.fresh_42 said:126. One of us has an odd value under Euler's ##\varphi## function, and one of us doesn't occur in its range. The third of us tells how many colors are sufficient to color a map on a ring. Me? This is the product of them.
D124
Yeah, I should have added smallest number which doesn't occur in the range, and excluded ##1##. As ##1## wouldn't contribute to the product, I thought I could leave it.mfb said:I'm confused by that one. ##\varphi(x)## is odd for x=1 and x=2 only, giving us two choices for the first number. No odd value apart from 1 occurs in its range (and various even numbers don't occur either), giving an infinite set of choices. The torus needs 7 colors.
That's a lot of options for the product.
Yes, and the next Giuga number is 858.mfb said:To split 30 in teams with a prime number of members we can only make teams of 2, 3 and 5, in all cases someone can make the described observation. That must be the solution.
This has a gigantic safety margin.fresh_42 said:131. There are 300 apples. The heaviest apple is at most three times as heavy as the lightest one.
Can you divide the apples into groups of four, so that no group of four weighs more than 3/2 times as much as any other group of four?
D126
I don't follow your logic. Why is ##m(300)-m(1)## an upper bound and not ##4## times of it? It is no telescope sum. And why is ##m(300)-m(1) < 2## and not ##m(300)-m(1)\leq 2m(1)##. One can norm ##m(1)=1## but then we wouldn't need ##m(1)## anymore.mfb said:This has a gigantic safety margin.Sort the apples by weight, let the mass of the lightest one (#1) by 1. Put apple 1, 5, 9, ... in one group, 2, 6, 10, ... in the second and so on. Group 1 has a mass of at least 75. The mass difference between group 1 and 2 is m(2)-m(1) + m(6)-m(5) + ... <= m(300)-m(1) < 2. The mass ratio is smaller than 77/75. Similar for the other groups. Note that, by construction, the groups have ascending masses. In general it is possible to make the mass ratio even smaller by exchanging some apples between the groups.
How do you finish? We must show ##G_{75}/G_1 \leq 1.5##. What we have ismfb said:It is a telescope sum: m(300)-m(1) = (m(300)-m(299)) + (m(299)-m(298)) + ... + (m(2)-m(1))
All these terms on the right side are non-negative, taking a subset of them cannot be larger than m(300)-m(1).
I defined m(1)=1 before but didn't use it in that one equation for consistency.
>>> for i in range(1,1000):
... if 444 == (i*i % 1000):
... print(str(i)+"^2="+str(i*i))
...
38^2=1444
462^2=213444
538^2=289444
962^2=925444
>>> for i in range(1,10000):
... if 4444 == (i*i % 10000):
... print(str(i)+"^2="+str(i*i))
...
>>> def check(N,k):
... for i in range(1,10**N):
... if k*(10**N-1)/9 == ((i*i)%(10**N)):
... print(str(i)+"^2="+str(i*i))