You are on page 1of 4

Volume 22, Number 3 February 2019 – April 2019

Olympiad Corner
Below were the Day 2 problems of the
Croatian Mathematical Olympiad
Sum of Digits of Positive Integers
which took place on May 6, 2018. Pedro Pantoja, Natal/RN, Brazil
Problem A2. determine all functions In this short article we will explore k+1st digit, then c(b,a)=c(b1,a1) and
f:ℝ→ℝ such that some types of problems in number thus
theory about the sum of digits of a
f(xf(y))=(1−y)f(xy)+x2y2f(y) positive integer. S(b+a) = S(b1+a1) + m + n
= S(b1)+m+S(a1)+n−9c(n1,m1)
holds for all real numbers x and y.
Throughout this article, S(a) will = S(b)+S(a)−9c(b,a).
Problem C2. Let n be a positive denote the sum of the digits of a positive
If there is a carry, then c(n,a) = 1 +
integer. Points A1, A2, …,An are located integer a. For example S(12)=1+2=3,
c(n1,ma1) and thus
on the inside of a circle, and points B1, S(349)=3+4+9=16. Let c(n,m) denote
B2, …,Bn are on the circle, so that the the total number of carries, which arises S(b+a) = S(b1+a1)+m+n−9
lines A1B1, A2B2, …, AnBn are mutually when adding a and b, for example = S(b1)+m+S(a1)+n−9(c(b1,a1)+1)
disjoint. A grasshopper can jump from c(100,4)=0, c(23,17)=1, c(88,99)=2. = S(b)+S(a)−9c(b,a).
point Ai to point Aj (for i,j∈{1,…,n},
i≠j) if and only if the lines AiAj does Proposition 1. For positive integer a, we This finishes the induction and we are
not go through any of the inner points have done.
of the lines A1B1, A2B2, …, AnBn. i) S(a)≤a; v) Because of symmetry, in order to
ii) S(a)≡a (mod 9); prove v), it suffices to prove that S(ab)
Problem G2. Let ABC be an iii) if a is even, then S(a+1)-S(a)=1; ≤ aS(b). The last inequality follows by
acute-angled triangle such that |AB| < iv) S(a+b)=S(a)+S(b)−9c(a,b), applying the subadditivity (iv) property
|AC|. Point D is the midpoint of the
in particular, S(a+b)≤S(a)+S(b); repeatedly. Indeed, S(2b)=S(b+b)≤S(b)
shorter arc BC of the circumcircle of
the triangle ABC. Point I is the incenter v) S(ab)≤min{aS(b),bS(a)}; +S(b) = 2S(b). After a steps we obtain
of the triangle ABC, and point J is the vi) S(ab)≤S(a)S(b); S(ab) = S(b+⋯+b)
reflection of I across the line BC. vii) S(a)≤9([log a]+1). ≤ S(b)+⋯+S(b) = aS(b).
Proof. i) and ii) are obvious. vi) and vii) Left as exercises for the
(continued on page 4)
reader.
iii) If a is even, then S(a+1)−S(a)=1. In
fact, a and a+1 differ only in the unit For applications, we provide
Editors: 高 子 眉 (KO Tsz-Mei)
梁 達 榮 (LEUNG Tat-Wing)
digit, which for a will be 0, 2, 4, 6 or 8
and for a+1 will be, respectively, 1, 3, 5, Example 1: Find all positive integers
李 健 賢 (LI Kin-Yin), Dept. of Math., HKUST
7 or 9. with n ≤ 1000 such that n = (S(n))3.
吳 鏡 波 (NG Keng-Po Roger), ITC, HKPU
Artist: 楊 秀 英 (YEUNG Sau-Ying Camille), MFA, CU Solution: The perfect cube numbers
iv) We proceed by induction on the
Acknowledgment: Thanks to Sindy Ting, Math. Dept.,
maximal number of digits k of b and a. smaller than 1000 are 1, 8, 27, 64, 125,
HKUST for general assistance. 216, 343, 512, 729. From these numbers
If both b and a are single digit numbers,
On-line: http://www.math.ust.hk/excalibur/
then we have just two cases. If b+a<10, the only one that satifies the conditions
The editors welcome contributions from all teachers and
then we have nocarries and clearly of the problem is n = 512.
students. With your submission, please include your name,
address, school, email, telephone and fax numbers (if S(b+a)=b+a=S(b)+S(a). If on the other Example 2: (MAIO-2012) Evaluate
available). Electronic submissions, especially in MS Word,
hand, b+a=10+k≥10, then
are encouraged. The deadline for receiving material for the
next issue is May 25, 2019.
S(1) − S(2) + S(3) − S(4) + ⋯
For individual subscription for the next five issues for the S(b+a) = 1+k = 1+(b+a−10) + S(2011) − S(2012).
18-19 academic year, send us five stamped self-addressed = S(b)+S(a)-9.
envelopes. Send all correspondence to: Solution: The problem becomes trivial
Dr. Kin-Yin LI, Math Dept., Hong Kong Univ. of Science Assume that the claim holds for all pairs using Proposition 1, item iii). We have
and Technology, Clear Water Bay, Kowloon, Hong Kong with at most k digits each. Let S(3)−S(2)=1, S(5)−S(4) = 1, …, S(2011)
Fax: (852) 2358 1643
b = b1+n·10k+1 and a = a1+n·10k+1, − S(2010) = 1 and S(1) = 1, S(2012) = 5.
Email: makyli@ust.hk
Therefore, S(1) − S(2) + S(3) − S(4) + ⋯
© Department of Mathematics, The Hong Kong where b1 and a1 are at most k digit + S(2011) − S(2012) =1+1005−5 =1001.
University of Science and Technology numbers. If there is no carry at the
(continued on page 2)
Mathematical Excalibur, Vol. 22, No. 3, Feb. 19 – Apr. 19 Page 2

Example 3: (Nordic Contest 1996) Remark 2: Notice that sometimes If k is sufficiently large, that is 10k−1>b,
Show that there exists an integer mathematical intuition deceives us. That it follows from above that S n k is one
divisible by 1996 such that the sum of its is, the nine numbers 1, 11, 111, …, 111…1 plus the sum of the digits of one of the
decimal digits is 1996. satisfy S(n2) = (S(n))2. Unfortunately, the numbers t in the set {0,1,…,[b]}. Since
next number in this family is k takes infinitely many values and the
Solution. We affirm that the number set of the numbers t is finite, it follows
m = 199619961996…199639923992 11111111112 = 1234567900987654321. that for infinitely many k, the sum of
satisfies the conditions of the statement. digits of numbers [ank+b] is the same.
Note that S(m)=25·78 +2·23=1996. On So S(1111111111) = 10, but S(1111111112)
the other hand, m is divisible by 1996, = 82. The smallest positive integer such Example 8: (2016 IMO Shortlisted
since m equals that S(n) = 10 and S(n2) = 100 is n = Problem) Find all polynomials P(x)
1101111211. with integer coefficients such that for
1996·100010001000…1000200002.
any positive integer n≥2016, the
Example 6: We say that a superstitious integer P(n) is positive and
Example 4: Find S(S(S(S(20182018)))).
number is equal to 13 times a sum of its
digits. Find all superstitious numbers. S(P(n)) = P(S(n)). (*)
Solution: Using proposition 1, item vii)
several times we have Solution: Let
Solution: Obviously there is no
S(20182018)≤9([2018 log 2018]+1) superstitious number with one digit. If a P ( x )  ad x d  ad 1 x d 1    a0 .
<60030, two digit number ab is superstitious, then
Clearly ad > 0. There exists an integer
10a+b=13(a+b), that is 3a+12b=0, which
m>1 such that |ai|<10m for all 0 ≤i ≤d.
S(S(20182018))≤9([log 60030]+1) is impossible.
Consider n=9·10k for a sufficiently
<45, large integer k in (*). If there exists an
If a three-digit number abc is superstitious,
2018 index 0 ≤ i ≤ d−1 such that ai < 0, then
S(S(S(2018 )))≤9([log 45]+1) <18. we would have 100a+10b+c=13(a+b+c).
all digits of P(n) in positions from
that is 29a=b+4c. The maximum possible
10ik+m+1 to 10(i+1)k−1 are all 9’s Hence,
On the other hand, 20182018 ≡ 22018 = value for b+4c is 45 (for b=c=9). So a
we have S(P(n))>9(k−m−1). On the
(23)672·22 ≡ 4 (mod 9). Hence, must be 1 and the equation 29=b+4c has
other hand, P(S(n))=P(9) is a fixed
solutions (b,c) = (1,7),(5,6), and (9,5). The
constant. Therefore, (*) cannot hold for
S(S(S(20182018))) = 4 or 13. numbers 117, 156 and 195 are the only
large k. This shows ai>0 and for all 0≤i
superstitious numbers with three digits.
≤ d−1. Hence, P(n) is an integer
So S(S(S(S(20182018)))) = 4. formed by the nonnegative integers
If a four-digit number abcd is superstitious,
2 3 ad9d, ad−19d−1,…, a0 by inserting some
Example 5: Prove that S(n)+S(n )+S(n ) it would result in 1000a+100b+10c+d
zeros in between.
is a perfect square for infinitely many =13(a+b+c+d). As the number on the left
positive integers n that are not divisible is at least 1000 and the number on the
This yields
by 10. right is at most 13·36=468, there is no
superstitious numbers of four digits. S(P(n))=S(ad9d)+S(ad−19d−1)+⋯+S(a0).
Solution: Let us prove that the Finally, there is no superstitious number
numbers of the form n  10 m  1
2
with more than four digits, since each Combining with (*), we have
satisfy the problem. The result follows added digit contributes at least 1,000 to S(ad9d)+S(ad−19d−1)+⋯+S(a0) = P(9)
immediately because there are the number on the left, while the one on = ad9d+ad−19d−1+⋯+a0.
infinitely many number of this form. the right contributes at most 13·9=117. So
Firstly, S(n)=9m2 and the only superstitious numbers are 117, As S(m)≤m for any positive integer m,
156 and 195. with equality when 1≤m≤9, this
forces each ai9i to be a positive integer
2 2
n2  102m  2 10m 1  99...9800...01
Example 7: (Romanian Team Selection between 1 and 9. In particular, this
where there are m2−1 9’s and 0’s. Then Test 2002) Let a, b > 0. Prove that the shows ai=0 for i>2 and hence d≤1.
S(n2)=9m2. Similarly, sequence S([an+b]) contains a constant Also, we have a1≤1 and a0≤9. If a1=1
subsequence. and 1≤a0≤9, we take n=10k+(10−a0)
S(n3)=99…9700…0299…9,
for sufficiently large k in (*). This
where there are m2−1 9’s and 0’s and Solution. For any positive integer k, let nk yields a contradiction. Since
m2 9’s at the end. Then S(n3)=18m2. equals [(10k+a−b)/b]. Then
S(P(n)) = S(10k+10) = 2
Finally, S(n)+S(n2)+S(n3)=36m2.  10k  a  b 
10k  a  1  b ≠11 = P(11−a0) = P(S(n)).
 a 
Remark 1: The numbers of the The zero polynomial is also rejected
previous problem are registered in 10  a  b 
k since P(n) is positive for large n. The
On-Line Encyclopedia of Integer  ank  b  a  b remaining candidates are P(x)=x or
 a 
Sequences (OEIS) A153185. Some P(x)=a0 where 1≤a0≤9, all of which
examples of such numbers: 9, 18, 45,  10  b.
k
satisfy (*), and hence are the only
90, 171, 180, 207, 279, 297, 396, 414, solutions.
It follows that 10k=[ank+b]≤10k+b.
450, 459, ….
(continued on page 4)
Mathematical Excalibur, Vol. 22, No. 3, Feb. 19 – Apr. 19 Page 3

Problem Corner (HBCSE, Mumbai, India), O Long Kin Connect AO, OD and extend OD to
Oscar (St. Joseph’s College), TAM Choi meet the circumcircle of ∆ABC at M.
We welcome readers to submit their Nang Julian (Yan Chai Hospital Law Then OD⊥BC and M bisects arc BC.
solutions to the problems posed below Chan Chor Si College), Duy Quan Also, A, E, M are collinear. Observe
for publication consideration. The TRAN (University of Medicine and AE, AF are internal and external
solutions should be preceded by the Pharmacy at Ho Chi Minh City, Vietnam)
bisectors of ∠BAC. So AE⊥AF.
solver’s name, home (or email) address and Bruce XU (West Island School).
and school affiliation. Please send
submissions to Dr. Kin Y. Li, Since HE⊥AE and HF⊥AF, so AEHF
The cases n = 1,2 can easily be checked.
Department of Mathematics, The Hong is a rectangle. Hence, segments AH and
For n≥3, bnbn-2 = bn-12+2 implies bn+1bn-1
Kong University of Science & EF bisect each other. Let AH and EF
= bn2+2. Subtracting these and factoring,
Technology, Clear Water Bay, Kowloon, meet at G. Then AG=½AH= ½EF=EG.
we get (bn+1-bn−1)/bn=(bn-bn−2)/bn−1. Then
Hong Kong. The deadline for sending
solutions is May 25, 2019. Also, OA=OM and OD || AH. So
(bn-bn−2)/bn−1= (bn−1-bn−3)/bn−2
Problem 531. BCED is a convex ∠OAE=∠OME=∠EAG=∠GEA.
= ⋯ = (b3−b1)/b2 = 4.
quadrilateral such that ∠BDC =∠CEB So (*) EG || OA.
= 90º and BE intersects CD at A. Let F, Hence, bn = 4bn−1− bn−2 for n ≥ 3. Since
G be the midpoints of sides DE, BC a1=b1 and a2=b2, an=bn for all n = 1,2,3,…. Next, observe O and H are the
respectively. Let O be the circumcenter Next, from circumcenter and the orthocenter of of
of ∆BAC. Prove that lines AO and FG ∆ABC respectively. Since OD⊥BC, so
are parallel. cn  2cn1  3cn21  2 , OD=½AH=AG. Finally, connect DG.
We see AODG is a parallelogram. So
Problem 532. Prove that there does not we can see cn is strictly increasing and for (**) DG || OA. Therefore, by (*) and
exist a function f:(0,+∞)→(0,+ ∞) such n≥2, (cn−2cn−1)2 = 3cn−12−2. Then cn2 − (**), D, E, G, F are collinear.
that for all x,y>0, 4cncn−1 + cn−12 = −2 and cn+12−4cn+1cn + cn2
= −2. Subtracting these and factoring, we Other commended solvers: Angel
f 2(x) ≥ f(x+y)(f(x)+y). get (cn+1−cn−1)(cn+1−4cn+cn−1) = 0. As cn+1 Gerardo Napa BERNUY (PUCP
> cn−1, we get cn+1=4cn-cn−1 for n≥2. So University, Lima, Peru), CHUI Tsz
Problem 533. Let ℤ and ℕ be the sets an=bn=cn for all n = 1,2,3,…. Fung (Ma Tau Chung Government
of all integers and all positive integers Primary School), DBS Maths Solving
respectively. Let r, s ∈ ℕ. Prove that Other commended solvers: AISINGIUR Team (Diocesan Boy’s School),
there are exactly (r+1)s+1−rs+1 functions To To, Alvin LUKE (Portland, Oregon, Prithwijit DE (HBCSE, Mumbai,
g:[1,s]∩ℕ→ [-r,r]∩ℤ such that for all USA), Corneliu MĂNESCU-AVRAM India), Andrea FANCHINI (Cantú,
x,y∈[1,s]∩ℕ, we have |g(x)−g(y)|≤r. (Ploieşti, Romania), Ioannis D. SFIKAS Italy), Jon GLIMMS, Corneliu
(Athens, Greece), Toshihiro SHIMIZU MĂNESCU-AVRAM (Ploieşti,
Problem 534. Prove that for any two (Kawasaki, Japan), SO Tsz To (S.K.H. Romania), Apostolos MANOLOUDIS,
positive integers m and n, there exists a Lam Woo Memorial Secondary School), George SHEN, Toshihiro SHIMIZU
positive integer k such that 2k -m has at Nicuşor ZLOTA (“Traian Vuia” (Kawasaki, Japan), Mihai
least n distinct prime divisors. Technical College, Focşani, Romania), STOENESCU (Bischwiller, France),
Titu ZVONARU (Comăneşti, Romania) Titu ZVONARU (Comăneşti,
Problem 535. Determine all integers and Neculai STANCIU (Buzău, Romania) and Neculai STANCIU
n>4 such that it is possible to color the Romania). (Buzău, Romania).
vertices of a regular n-sided polygon
using at most 6 colors such that any 5 Problem 527. Let points O and H be the Problem 528. Determine all positive
consecutive vertices have distinct circumcenter and orthocenter of acute integers m satisfying the condition that
colors. ∆ABC. Let D be the midpoint of side BC. there exists a unique positive integer n
Let E be the point on the angle bisector of such that there exists a rectangle which
*****************
∠BAC such that AE⊥HE. Let F be the can be decomposed into n congruent
Solutions point such that AEHF is a rectangle. Prove squares and can also be decomposed
**************** that points D, E, F are collinear. into n+m congruent squares.

Problem 526. Let a1=b1=c1=1, a2=b2= Solution. Alvin LUKE (Portland, Oregon, Solution. Angel Gerardo Napa
c2=3 and for n≥3, an=4an-1 –an-2, USA). BERNUY (PUCP University, Lima,
Peru), CHUI Tsz Fung (Ma Tau
bn21  2 A
bn  , cn  2cn1  3cn21  2 . F Chung Government Primary School) ,
bn2 and Toshihiro SHIMIZU (Kawasaki,
Prove that an=bn=cn for all n =1,2,3,…. G Japan).

Solution. Angel Gerardo Napa O E


Suppose rectangle ABCD can be
BERNUY (PUCP University, Lima, H decomposed into n+m unit squares and
Peru), CHUI Tsz Fung (Ma Tau also into n squares with sides equal x.
Chung Government Primary School), B D C Let x = a/b with gcd(a,b) = 1. Then the
DBS Maths Solving Team (Diocesan area of rectangle ABCD is n+m as well
Boy’s School), Prithwijit DE
M
Mathematical Excalibur, Vol. 22, No. 3, Feb. 19 – Apr. 19 Page 4

as n(a/b)2. Then from n+m = n(a/b)2, When n≥2, we have Olympiad Corner
we can solve for n to get
yn < S=T n < (y+2)n. (*) (Continued from page 1)
mb2 mb2
n 2  .
a  b 2 (a  b)(a  b)
So T = y+1. However, when y is even, S ≡ Problem G2. (cont.) Line DJ
yn (mod 2) is even, but then S = (y+1)n is intersects the circumcircle of the
Since gcd(b,a+b) = gcd(b,a−b) = odd by (*). Similarly, when y is odd, S ≡ yn triangle ABC at the point E which lies
gcd(a,b) = 1, so (a−b)(a+b) | m. Now (mod 2) is odd, but then S=(y+1)n is even on the shorter arc AB. Prove that
a+b, a−b are of the same parity. If m is by (*). Again this leads to a contradiction. |AI|=|IE| holds.
the product of positive integers i, j, k
with j, k odd and greater than 1, then In conclusion, when integer n is at least 2, Problem N2. Let n be a positive
(a+b,a−b) = (j,k) or (jk,1) leading to there are no solutions. So the only solution integer. Prove that there exists a
n=i(j−k)2/4 or i(jk−1)2/4, contradicting are x=t2−4, y=t, n=1, where integer t≥3. positive integer k such that
the uniqueness of n. So m can have at
most one odd factor greater than 1, i.e. Other commended solvers: Ioannis D. 51k − 17
m=2c or 2cp with p an odd prime. SFIKAS (Athens, Greece). is divisible by 2n.
c
In case m=2 , for c=1,2, there is no n;
Problem 530. A square can be
for c=3, m=8 and (a,b)=(2,4), n=1; for
decomposed into 4 rectangles with 12
c≥4, (a+b,a−b)=(4,2) or (8,2) resulting
edges. If square ABCD is decomposed
in n = 2c-3 or 2c-4 contradicting the
into 2005 convex polygons with degrees
uniqueness of n.
of A, B, C, D at least 2 and degrees of all Sums of Digits …
In case m=2cp, for c=0, m=p and other vertices at least 3, then determine
(Continued from page 2)
(a+b,a-b) = (p,1), n = (p−1)2/4; for c = the maximum number of edges in the
1, (a+b,a-b) = (p,1), n = (p-1)2/2; for c decomposition.
Next, we will provide some exercises
= 2, (a+b,a-b) = (p,1), n = (p-1)2; for for the readers.
c≥3, (a+b,a−b) = (4,2) or (p,1) Solution. CHUI Tsz Fung (Ma Tau
contradict the uniqueness of n. Chung Government Primary School),
DBS Maths Solving Team (Diocesan Problem 1: (Mexico 2018) Find all
So the only solutions are m = 8, p, 2p, Boy’s School) and Toshihiro SHIMIZU pairs of positive integers (a,b) with
4p, where p is an odd prime. (Kawasaki, Japan). a>b which simultaneously satisfy the
following two conditions
Other commended solvers: Victor Let v, e, f be the number of vertices, edges
LEUNG Chi Shing and Charles a | b+S(a) and b | a+S(b).
and faces used in decomposing the square
POON Tsz Chung. respectively. By Euler’s formula, we have Problem 2: (Lusophon 2018)
v−e+f = 1 (omitting the exterior of the Determine the smallest positive integer
Problem 529. Determine all ordered square).
triples (x,y,n) of positive integers a such that there are infinitely many
satisfying the equation xn+2n+1 = yn+1 positive integer n for which you have
Let d(V) be the number of edges S(n)−S(n+a) = 2018.
with x is odd and the greatest common connected to V. Let V be a vertex on the
divisor of x and n+1 is 1. square other than A,B,C,D. Then d(V)≥3, Problem 3: (Cono Sur 2016) Find all n
Solution. Alvin LUKE (Portland, which is the same as d(V)≤3d(V)−6. such that S(n)(S(n)−1) = n−1.
Oregon, USA) and Toshihiro
SHIMIZU (Kawasaki, Japan). Now there are v−4 vertices not equal to A, Problem 4: (Iberoamerican 2014) Find
B, C, D. The sum of the degrees of the v−4 the smallest positive integer k such that
When n=1, let y=t be an integer at least vertices other than A, B, C, D is
3 and x=t2−4 are solutions. When n≥2, 2e−[d(A)+d(B)+d(C)+d(D)], which is at S(k) = S(2k) = S(3k) = ⋯
n least 3(v−4). Since d(A), d(B), d(C), d(D) = S(2013k) = S(2014k).
x n  y n 1  2 n 1  ( y  2) 2 k y n  k . ≥2, we get
k 0

2e−8≥2e−[d(A)+d(B)+d(C)+d(D)] Problem 5: (OMCC 2010) Find all


For any prime factor p of y-2, from solutions of the equation n(S(n)−1) =
above, we see x must be a multiple of p. ≥3(v−4) = 3v−12.
2010.
As x is odd, p is also odd. As gcd(x,n+1) Since v−e+f = 1, 3e = 3v+3f−3 ≤ 2e+1+3f,
= 1, we see gcd(x,(n+1)2n) = 1. Then p which simplies to e ≤ 3f +1. Problem 6: (Iberoamerican 2012)
is not a factor of (n+1)2n. Now Show that for all positive integers n
n n For equality case, we can decompose the there are n consecutive positive
S  2k ynk  2n  (n 1)2n (mod y  2). unit square into rectangles of size 1 by
k0 k 0
integers such that none is divisible by
1/2005, which has 3×2005+1=6016 the sum of their respective digits.
Hence, p is not a factor of S. So we edges.
have gcd(y−2,S) = 1. So S=T n for some
positive integer T. Since y is positive, y  
is at least 3.

You might also like