## 12403 Reputation

8 years, 157 days

## An elementary problem...

Maple

Here is a very nice (but not easy) elementary problem.
The equality
ceil(2/(2^(1/n)-1)) = floor(2*n/ln(2));

is not an identity, it does not hold for each positive integer n.
How to find such a number?

[This is a re-post, because the original vanished when trying a conversion Question-->Post]

The problem appears in the recent book:
Richard P. Stanley - Conversational Problem Solving. AMS, 2020.

The problem is related to a n-dimensional tic-tac-toe game. The first counterexample (2000) was wrong due to a multiprecision arithmetic error.
The  author of the book writes
"To my knowledge, only eight values of n are known for which the equation fails,
and it is not known whether there are infinitely many such values",

but using Maple it will be easy to find more.

A brute-force solution is problematic because the smallest counterexample is > 7*10^14.

restart;
a := 2/(2^(1/n)-1): b := 2*n/ln(2):
asympt(b-a, n);


It results:  b - a → 1 (for n →oo);
So, to have a counterexample, b must be close to an integer
m ≈ 2*n/ln(2)  ==> n/m ≈ ln(2)/2

The candidates for n/m will be obviously the convergents of the continued fraction of the irrational number ln(2)/2.

convert(ln(2)/2, confrac, 200, 'L'):
Digits:=500:
for n in numer~(L[3..]) do
if not evalf(ceil(a)=floor(b)) then printf("n=%d\n", n) fi;
od:


n=777451915729368
n=140894092055857794
n=1526223088619171207
n=54545811706258836911039145
n=624965662836733496131286135873807507
n=1667672249427111806462471627630318921648499
n=36465374036664559522628534720215805439659141
n=2424113537313479652351566323080535902276508627
n=123447463532804139472316739803506251988903644272
n=97841697218028095572510076719589816668243339678931971
n=5630139432241886550932967438485653485900841911029964871
n=678285039039320287244063811222441860326049085269592368999
n=312248823968901304612135523777926467950572570270886324722782642817828920779530446911
n=5126378297284476009502432193466392279080801593096986305822277185206388903158084832387
n=1868266384496708840693682923003493054768730136715216748598418855972395912786276854715767
n=726011811269636138610858097839553470902342131901683076550627061487326331082639308139922553824778693815

So, we have obtained 16 counterexamples. The question whether there are an infinity of such n's remains open.

## International Mathematics Competition fo...

Maple

This year, the International Mathematics Competition for University Students  (IMC) took place online (due to Coronavirus), https://www.imc-math.org.uk/?year=2020

One of the sponsors was Maplesoft.

Here is a Maple solution for one of the most difficult problems.

Problem 4, Day 1.

A polynomial  with real coeffcients satisfies the equation

, for all real .

Prove that  for   .

A Maple solution.

Obviously, the degree of the polynomial must be 101.

We shall find effectively p(x).

 > restart;
 > n:=100;
 (1)
 > p:= x -> add(a[k]*x^k, k=0..n+1):
 > collect(expand( p(x+1) - p(x) - x^n ), x):
 > S:=solve([coeffs(%,x)]):
 > f:=unapply(expand(eval(p(1-x)-p(x), S)), x);
 (2)
 > plot(f, 0..1); # Visual check: f(x)>0 for 0
 > f(0), f(1/4), f(1/2);
 (3)
 > sturm(f(x), x, 0, 1/2);
 (4)

So, the polynomial f has a unique zero in the interval (0, 1/2]. Since f(1/2) = 0  and f(1/4) > 0, it results that  f > 0 in the interval  (0, 1/2). Q.E.D.

## A riddle ! ...

Maple 2018

Can you guess what P() produces, without executing it?

P:=proc(N:=infinity) local q,r,t,k,n,l,h, f;
q,r,t,k,n,l,h := 1,0,1,1,3,3,0:
while h<N do
if 4*q+r-t < n*t
then f:=if(++h mod 50=0,"\n",if(h mod 10=0," ","")); printf("%d"||f,n);
q,r,t,k,n,l := 10*q,10*(r-n*t),t,k,iquo(10*(3*q+r),t)-10*n,l
else q,r,t,k,n,l := q*k,(2*q+r)*l,t*l,k+1,iquo(q*(7*k+2)+r*l,t*l),l+2
fi
od: NULL
end:


I hope you will like it (maybe after execution).

## Happy New Year!...

Maple
with(plots):
S:=cat("Happy New Year 2020!   "\$3):
N:=length(S): a:=0.77*Pi: h:=2*Pi/N:
display(seq(textplot([cos(a-k*h), sin(a-k*h),S[k+1]],
rotation=-Pi/2+a-k*h, 'font'=["times","roman",24]), k=0..N-4), axes=none);


## Putnam Mathematical Competition 2019...

Maple 2018

Maple can easily solve the B4 problem of the Putnam Mathematical Competition 2019  link

B4.  Let F be the set of functions f(x,y) that are twice continuously differentiable for x≥1, y≥1 and that satisfy the following two equations:

For each f2F, let

Determine m(f), and show that it is independent of the choice of f.

 > # Solution
 > pdsolve({ x*diff(f(x,y),x)+y*diff(f(x,y),y) = x*y*ln(x*y), x^2*diff(f(x,y),x,x)+y^2*diff(f(x,y),y,y) = x*y });
 (1)
 > f:=unapply(rhs(%[]), x,y);
 (2)
 > h := f(s+1, s+1) - f(s+1, s) - f(s, s+1) + f(s, s);
 (3)
 > minimize(h, s=1..infinity);
 (4)