Math 640: EXPERIMENTAL MATHEMATICS (Famous Open Problems!) Spring 2016 (Rutgers University) Webpage

http://sites.math.rutgers.edu/~zeilberg/math640_16.html

Last Update: May 5, 2016.


Description

Experimental Mathematics used to be considered an oxymoron, but the future of mathematics is in that direction. In addition to learning the philosophy and methodology of this budding field, students will become computer-algebra wizards, and that should be very helpful in whatever mathematical specialty they are doing (or will do) research in.

We will first learn Maple, and how to program with it. This semester we will get an overview of some of the major open problems in mathematics, and see that using experimental mathematics will make us understand them much better, and hence increase our chances of solving them from ε2 to ε. We will also learn how to search the internet for "minor" open problems, that are directly doable by using readily available computer algebra software, and result in publishable articles.

In addition to the actual, very important content, students will master the methodology of computer-generated and computer-assisted research that is so crucial for their future.

There are no prerequisites (in particular, no prior knowledge of Maple, or any programming experience, is assumed). Also, no overlap with previous years.


Added Jan. 25, 2016: Students are encouraged to solve any problem in the Problem Section of the American Mathematical Monthly in its 100 years of existence, using Maple in a substantial way. All solutions will be posted, with due credit in this page. The three people submitting the most solved problems will get prizes.

[Added May 10, 2016: Mingjia Yang won the prize.]


Optional (but Highly recommended) Getting Started Homework (assigned Jan. 4, 2016)

Teach yourself the basics of Maple by reading Frank Garvan's golden-oldie part 1, part 2
Note: a few commands are no longer valid in today's Maple. The most important one is that " has been replaced by %.

Reading Homework (assigned Jan. 19, 2016), due Jan. 21, 2016

How to submit homework


Diary and Homework assignments

Programs done on Thurs., Jan. 21, 2016

C1.txt , Contains procedures

Homework for Thurs., Jan. 21, class (due Sunday Jan. 24, 10:00pm)

Please email ShaloshBEkhad at gmail dot com an email with

Subject: hw#1

and an attachment

hw1FirstNameLastName.txt

  1. [People who took this class before, or already know Maple, are exempt from this]

    Read and do all the examples, plus make up similar ones, in the first 30 pages of Frank Garvan's awesome Maple booklet ( part 1, part 2)
    Only record a small sample in hw1YourName.txt .
    Note: a few commands are no longer valid in today's Maple. The most important one is that " has been replaced by %.

  2. [Challenge for novices] Look up amicable pairs, and write a procedure

    Amicable(N)

    that inputs a positive integer N and outputs the set of all pairs [a,b], with 1 ≤ a < b ≤ N that are amicable.

    What is

    Amicable(1000)?

  3. Use human reasoning to prove that if p is prime, and 2^p-1 is also prime, then 2^(p-1)*(2^p-1) is a perfect number.

  4. Write a procedure

    C(eps,N)

    that inputs a small positive number, eps, and a large positive integer N, and outputs the maximum of

    abs(evalf(M(n)/n^(1/2+eps)))

    for n from 1 to N. Here M(n) is the Mertens function, that we called Mer(n) in the Maple code.

    Using this procedure, find

    C(1/10,3000);   C(1/100,5000);   C(0,10000);

  5. [Optional, extra credit, $1,000,000 award] Prove that for every eps>0, C(eps,infinity) is finite.

  6. [Challenge for novices] Consider the sequence [seq(JL(n),n=1..infinity)]

    n is a left-to-right maximum if JL(n) is larger than JL(m) for all m < n   .

    Write a procedure

    LtoRmaxJL(N)

    that finds the locations of all the left-to-right maxima of JL(n) up N.

    What is

    LtoRmaxJL(2000)?

    Do you notice anything about these numbers?


Added Jan. 25, 2016: See the students' nice Solutions to the 1st homework assignment


Programs done on Monday Jan. 25, 2016

C2.txt , Contains procedures

Homework for Monday, Jan. 25, class (due Sunday Jan. 31, 10:00pm)

Please email ShaloshBEkhad at gmail dot com an email with

Subject: hw#2

and an attachment

hw2FirstNameLastName.txt

  1. [People who took this class before, or already know Maple, are exempt from this]

    Read and do all the examples, plus make up similar ones, in the pages 30-60 of Frank Garvan's awesome Maple booklet ( part 1, part 2)
    Only record a small sample in hw2YourName.txt .

  2. Amer. Mathematical Monthly (Dec. 2015) Number 11876 (that we did in class) asked you to evaluate

    Sum((-1)^n*(a^n+b^n)/(n+2),n=1..infinity)

    where and b are the roots of x^2+x+1/2=0. Write a procedure

    Gen11876(c1,c2)

    that, more generally, does the same for the roots of x^2+c1*x+c2=0. In particular

    Gen11876(1,1/2)

    should give the answer to the original problem (that we found out was π-3).

    Try to find other values of c1 and c2 such that Gen11876(c1,c2); gives "nice" answers.

  3. [New version, of Jan. 26, 2016].

    Type in Maple

    plot(evalf(abs(Zeta(1/2+s*I))),s=1..100);

    To get a very rough idea of the location of the first few non-trivial zeros of ζ(s) .

    Then by using

    plot(evalf(abs(Zeta(1/2+s*I))),s=a..b);

    for smaller and smaller intervals [a,b] locate numerically these zeros hopefully confirming the data in mathworld

    Hint: For example it seems that there is a root between s=13 and s=15, so type plot(evalf(abs(Zeta(1/2+s*I))),s=13..15);

    Now it looks like that there is a root between s=14.1 and s=14.2, so type

    plot(evalf(abs(Zeta(1/2+s*I))),s=14.1..14.2);

    Now it looks like that there is a root between s=14.13 and s=14.14, so type

    plot(evalf(abs(Zeta(1/2+s*I))),s=14.13..14.14);

    and keep narrowing it down until you get as many digits as in the table in mathworld. For the first root it is: 14.134725

    Repeat for the other roots with s < 100.

  4. Read the wikipedia entry about Normal Number

  5. [Big challenge for novices] Extend the procedure

    IsNormal(x,K,d)

    to write a procedure

    IsNormalG(x,K,d,g)

    That inputs the same as IsNormal(x,K,d), but also a positive integer d, and outputs a list L of size dg such that its entries are the number of occurrences of g consecutive digits in the base-d representation of x (up to K places). In particular

    IsNormalG(x,K,d,1)

    should be the same as IsNormal(x,K,d).

    Hint: You may want to first write a subroutine, ListToNum(L,d), that inputs a list of digits in base d, and outputs its numerical value, For example ListToNum([1,0,2],3) should be 3^2+0*3+2*1=11. Then in the main program replace the line

    f:=add(z[L[i]],i=1..nops(L)):

    By

    f:=add(z[ ListToNum([op(i..i+g-1,L],d),i=1..nops(L)-g+1):

  6. Write a procedure

    HowNormal(x,K,d)

    that uses IsNormal(x,K,d), getting as output a list L of size d. Calling the sum of the entries of L, |L| (in Maple: add(L[i],i=1..nops(L)), or, convert(L,`+`)). The output of HowNormal(x,K,d) should be

    add( (L[i]/|L| -1/d)^2, i=1..d)

    Note that the closer x is to being normal, the smaller this should be.

    For K=4, d=10. Find the output of HowNormal(sqrt(n),4,10) for all n from 2 to 1000 that are NOT perfect squares. What sqrt(n) is the most normal? What is the least normal?

Added Feb. 1, 2016: See the students' nice Solutions to the 2nd homework assignment


Programs done on Thurs. Jan. 28, 2016

C3.txt , Contains procedures

Homework for Thursday, Jan. 28, class (due Sunday Jan. 31, 10:00pm)

Please email ShaloshBEkhad at gmail dot com an email with

Subject: hw#3

and an attachment

hw3FirstNameLastName.txt

  1. [People who took this class before, or already know Maple, are exempt from this]

    Read and do all the examples, plus make up similar ones, in the pages 60-90 of Frank Garvan's awesome Maple booklet ( part 1, part 2)
    Only record a small sample in hw3YourName.txt .

  2. Review the exciting topic of Continued Fraction by reading the wikipedia entry

  3. Using procedure ListToN(L) we did in class, write a procedure

    EvalPP(L)

    that inputs a list of positive integers L, and finds the quadratic irrationality whose continued fraction is Linfinity (i.e. L repeated infinitely many times)

    Hint: Extend the "self-similarity" argument we did for y=2infinity that it implied that y=2+2/y. Now we have y=ListToN([op(L),y]):

  4. Using EvalPP(L), write a procedure

    EvalP(Pair), where Pair is a pair of lists of positive integers (e.g. those that come as outputs of CfSq(n)), Pair=[M,L], and outputs the EXACT value of the continued fraction

    M Linfinity

    For example

    EvalP([[1],[2]]);

    should output sqrt(2).

  5. Write a procedure

    Proved(CfSq(n))

    that first uses CfSq(n) to guess an ultimately-periodic continued fraction representation, and then goes on to rigorously prove it, by proving that EvalP(CfSq(n)) equals sqrt(n)

    [Hint: Maple is terrible in simplifying surds (quadratic irrationalities), you should use simplify( EvalP(CfSq(n))-sqrt(n)) and make sure that you get 0.

  6. For all non-perfect squares, starting with n=2, compute the first 90 terms of the sequence "length of period of the pure part of the continued fraction of sqrt(n)", and see whether it is in the OEIS.

  7. [Extra credit, $1000 prize] Prove or disprove that the the terms of the continued fraction of the cubic-root of 2 (in other words, 21/3) are bounded.

Added Feb. 1, 2016: See the students' nice Solutions to the 3rd homework assignment


Programs done on Monday Feb. 1, 2016

C4.txt , Contains procedures

Homework for Feb. 1, 2016, class (due Sunday, Feb. 7, 10:00pm)

Please email ShaloshBEkhad at gmail dot com a message with

Subject: hw#4

and an attachment

hw4FirstNameLastName.txt

  1. [People who took this class before, or already know Maple, are exempt from this]

    Read and do all the examples, plus make up similar ones, in the pages 90-120 of Frank Garvan's awesome Maple booklet ( part 1, part 2)
    Only record a small sample in hw4YourName.txt .

  2. Write a procedure

    LtoRmax(L)

    that inputs a list of numbers and outputs the sublist of entries that are larger than all the previous entries.

    For example

    LtoRmax([2,1,5,4,11,3,13,12,10,3]);

    should output

    [2,5,11,13]

  3. It is a big open problem whether the terms of the simple continued fraction of the cubic-root of m, m1/3, (for m not a perfect cube) are bounded. If the terms of the continued fraction of m^(1/3) are bounded then the sequence

    LtoRmax(C(m^(1/3),infinity))

    is a finite sequence, otherwise it is infinite. Hence these sequences are very important. For m between 2 and 20 (except for 8) find the first few terms , using LtoRmax(C(m^(1/3),300). Are they in the OEIS? Should they be? If you feel that they should, you are welcome to submit them.

  4. Read the mathworld article about irrationality measure

Added Feb. 8, 2016: See the students' nice Solutions to the 4th homework assignment

Programs done on Thurs. Feb. 4, 2016

C5.txt , Contains procedures

Homework for Feb. 4, 2016, class (due Sunday, Feb. 7, 10:00pm)

Please email ShaloshBEkhad at gmail dot com a message with

Subject: hw#5

and an attachment

hw5FirstNameLastName.txt

  1. Using a suggestion of Andrew Lohr, write a procedure GPli(L,n) that inputs and outputs the same as GP(L,n), but instead of linear algebra uses the Lagrange Interpolation Formula.

    Hints: First write Pli1(L,n,d) that uses the Lagrange Interpolation formula to fit the first d+1 entries of L with a polynomial of degree d (it always exists), and then checks whether it fits the remaining data. For efficiency's sake check whether the polynomial fits the data, in turn, for L[d+2],L[d+3] and as soon as you get a disagreement, return FAIL.

    Also use the Maple commands "add" and "mul" to implement the Lagrange interpolation formula succinctly.

  2. Write a procedure

    RandPolSeq(n,d,K)

    that inputs a variable n, a positive integer d, a large positive integer K, and outputs a polynomial, let's call it p, in n, of degree d, with coefficients between 1 and K (chosen randomly). Use these to generate its list of values from 1 to 3*d, call the list L, and then use both GP(L,n) and the GPli(L,n) that you created above, and see whether they both give you p back, and find out which procedure is faster, (for fairly large d, of course for small d they are both very fast), by using the Maple command time().

  3. Write a procedure C(n) that inputs a positive integer n and outputs the number of triples of non-negative integers

    0 ≤ x12 ≤ x13 ≤ x23 ≤ n

    that obey the triangle condition

    x23 ≤ x12 +x13

    Hint: Introduce a counter, co, then do a triple do-loop with x12, x13, x23 each going from 0 to n, and then for each candidate check whether the condition is satisfies, and in that case, add 1 to co.

  4. Use GP(L,n) to conjecture a closed-form (polynomial) formula for C(n).

  5. [Optional Challenge, 10 dollars to be divided among the correct solvers] : Conjecture a closed-form polynomial expression for the number of 3 by 3 "magic squares" with row- and column- sums n, i.e. 3 by 3 matrices whose entries are non-negative integers such that each row-sum and each column-sum equals n [ignore the diagonals]

    Hint: Once you have the four entries a11,a12,a21,a22, the remaining 5 entries can be determined and must all be non-negative, use a similar approach to the above problem to do the brute-force counting, and then try to fit the data with a polynomial.

Added Feb. 8, 2016: See the students' nice Solutions to the 5th homework assignment


Programs done on Monday Feb. 8, 2016

C6.txt , Contains procedures

Homework for Feb. 8, 2016, class (due Sunday, Feb. 14, 10:00pm)

Please email ShaloshBEkhad at gmail dot com a message with

Subject: hw#6

and an attachment

hw6FirstNameLastName.txt

  1. By reading, for example Niloufar Shafiei's lucid and insightful article, write (yourself!) a program

    Solve(R,n)

    that inputs a pair R=[ini,rec] (same type of input as in RecToSeq(R,N)) and a variable n, and outputs a closed-form solution for x(n), the n-th term of the solution of the recurrence (as above R=[ini,rec], where rec=[c1, ..., ck]

    x(n)=c1*x(n-1)+ ... + ck*x(n-k)

    You may assume that all the roots of the so-called indicial equation

    z^k-c1*z^(k-1)-... ck*z^0=0

    are distinct.

    Hint: first use Maple to solve the indicial equation, call its roots a1, ..., ak, set up a template

    x(n)=C1*a1^n+ ... + Ck*ak^n

    and use linear algebra (again Maple's solve, but this time solving a system of linear equations) to find C1, ..., Ck but using the initial conditions x(0)=ini[1], ..., x(k-1)=ini[k]

    Check that the output agrees with the output of RecToSeq(R,N), also compare your output to Maple's built-in command "rsolve"

  2. [Human exercise] prove that if the largest root of the indicial equation

    z^k-c1*z^(k-1)-... - ck*z^0=0

    is a1, and abs(a1) is larger than the absolute value of the other roots, then the limit of the ratio of consecutive terms in the sequence x(n),

    limit (x(n+1)/x(n), n=infinity)

    equals a1.

  3. Write a procedure

    IrratMeasureSequence(R,N)

    that inputs a recurrence R=[ini,rec] and a positive integer N and finds the first N terms of the sequence of real numbers, delta(n) such that

    |x(n+1)/x(n)-a1| is roughly 1/(x(n)^delta(n))

    Hint

    delta(n)= -log(|x(n+1)/x(n)-a1|)/log(x(n))

    See whether this sequence seems to converge.

    What are the outputs of

    IrratMeasureSequence([[0,1],[1,1]],100);

    IrratMeasureSequence([[0,1,1],[1,1,1]],100);

  4. [Optional Challenge, 10 dollars to be divided] Our beloved "boss", Professor Stephen D. Miller recently wrote a delightful article about the Baltimore Ravens NFL player, John Urschel, where he states (sidebar 1) the Urschel-Zikatanov theorem.

    Note: The Definition of Δf(x) there has a typo it should be

    Δf(x)= (Σx->y w(x,y)) f(x) - Σx->y w(x,y) f(y)

Added Feb. 15, 2016: See the students' nice Solutions to the 6th homework assignment


Programs done on Thurs. Feb. 11, 2016

C7.txt , Contains procedures

Homework for Feb. 11, 2016, class (due Sunday, Feb. 14, 10:00pm)

Please email ShaloshBEkhad at gmail dot com a message with

Subject: hw#7

and an attachment

hw7FirstNameLastName.txt

  1. Read pp. 10-11 of this masterpiece and pp. 2-4 of another masterpiece

  2. Write a procedure

    Power(R,k)

    that inputs a C-finite sequence R=[ini,rec] and a positive integer k and outputs the description of its k-th power.

  3. [Extra credit, 5 dollars to be divided, I don't know the answer (and no searching the internet)]

    Conjecture (and if you wish, prove, but I am not offering any money for that) a closed form expression for the coefficients of the linear recurrence satisfied by the the sequence of k-th powers of the Fibonacci sequence, (Fn)k

    [Added Feb. 15, 2016: Mingjia Yang won the prize! These are (except for the sign) the Fibonomial Coefficients, and this result goes back to the Israeli amateur mathematician (and distinguished historian) Dov Jarden, and is referenced in Knuth's Art of Computer Programming]

  4. Using procedure MulC(R1,R2), prove all the theorems in James Sellers' article

Added Feb. 15, 2016: See the students' nice Solutions to the 7th homework assignment (including valentines)


Programs done on Monday. Feb. 15, 2016

C8.txt , Contains procedures

Homework for Feb. 15, 2016, class (due Thursday, Feb. 18, 11:00am)

Please email ShaloshBEkhad at gmail dot com a message with

Subject: hw#8

and an attachment

hw8FirstNameLastName.txt

  1. Write a procedure

    PRecToSeqW(R,n,N,w): inputs a P-recursive sequence R=[ini,rec(n)] where ini is a list of the initial value, rec is a list of rational functions in n, representing the coefficients of the recurrence, N is a ( usually) large positive integer, and w is a small positive integer (but at least nops(ini)) representing the "window size", and outputs the list consisting of the terms N-w+1 through N of that sequence starting at n=N-w+1 and ending at n=N. In other words, write a P-recursive analog of RecToSeqW(R,N,w). In particular,

    PRecToSeqW(R,n,N,w)[w]

    should give you the N-th term of the sequence.

  2. Read Alf van der Poorten's masterpiece on Roger Apéry's seminal proof of the irrationality of ζ(3)   .


Added Feb. 18, 2016: See the students' nice Solutions to the 8th homework assignment


Programs done on Thurs. Feb. 18, 2016

C9.txt , Contains procedures

Homework for Feb. 18, 2016, class (due Sunday, Feb. 21, 10:00pm)

Please email ShaloshBEkhad at gmail dot com a message with

Subject: hw#9

and an attachment

hw9FirstNameLastName.txt

  1. [Corrected version: Feb. 19, 2016, 1:43pm; (thanks to Andrew Lohr, John Chiarelli, and Antony Zaleski) Correction^2 (thanks to Bryan Ek): Feb. 20, 2016, 2:45pm]

    Write a procedure

    FindSecondAperyMiracle(F,k,n,N0,Max)   ,

    that finds a positive integer m ≤ Max (if it exists, otherwise RETURN FAIL), that has the property that if you multiply the n-th term of the sequence

    anSeq:=PRS(R0,n,N):

    (where R0=[[0$(ORDER-1),1], R[2]], and R=Z(F,k,n), in other words it is the sequence that Apéry and van der Poorten call a_n,
    [except that instead of the initial conditions being [0,1] they take [0,AnotherInteger], but this only causes the constant to be multiplied by an integer, and does not change the irrationality status]

    while b_n is the original sequence of integers, given by PRS(R,n,N), and the sequence of approximations is then a_n/b_n ) by

    lcm(1,...n)^m

    you always get integers.
    (Recall that the sequence starts at n=0 so the n-th term of the Apery sequence is RAseq(F,k,n,N0)[n+1])

    What are

  2. It is well-known and not too hard to see that for a P-recursive sequence that is annihilated by the linear recurrence operator with polynomial coefficients

    ope(n,N)

    (in the same form as the output of SumTools[Hypergeometric][Zeilberger](F,n,k,N)[1])

    is (under some conditions that are always true in our cases) asymptotically approximately

    C(n)αn

    for some very slowly-growing function, C(n) (e.g. polynomial) such that C(n+1)/C(n) goes to 1 as n goes to infinity,

    where α is the largest root of the poynomial in N that is the leading coefficient in n of ope(n,N).

    For example, if

    ope(n,N)= n^2*(N-1)*(N-2) + 3*n*N^3 +N^4

    then α=2. Write a procedure

    FindAlpha(F,k,n)

    That inputs an expression F involving binomial coefficients in the variables k and n and outputs the α (a certain algebraic number, for the most interesting cases for us, the larger root of a quadratic equation).

    Hint: the command in Maple for the leading coefficient of a polynomial P of n is: lcoeff(P,n).

  3. If the recurrence for the Apery-like sum is second-order then following the argument in Alf van der Poorten's masterpiece, (top of second column of p. 199), (recall that our δ is 1 more than his δ) and α is the output of FindAlpha(F,k,n) and m is the output of FindSecondAperyMiracle(F,k,n,100,20), the rigorous value of δ is

    2*log(α)/(log(α)+m)   .

    Write a procedure

    RigDel(F,k,n)

    that finds the rigorous δ that would make you famous if it is bigger than 1.

    What are

  4. [Optional Challenge] Find as many F's as you can that have rigorous deltas larger than 1. In each case, try to conjecture the constant (that a_n/b_n converges to, i.e. the one that we are trying to prove, by Apéry's method, is irrational) by using the Maple command "identify". Another (possibly better) way is to use the the Inverse Symbolic Calculator (pioneered by Simon Plouffe and perfected by the CARMA team and others).

  5. Get ready for the next class by reading in wikipedia the article about the 3x+1 conjecture.

Added Feb. 22, 2016: See the students' nice Solutions to the 9th homework assignment


Programs done on Monday. Feb. 22, 2016

C10.txt , Contains procedures

Homework for Feb. 22, 2016, class (due Sunday, Feb. 28, 10:00pm)

Please email ShaloshBEkhad at gmail dot com a message with

Subject: hw#10

and an attachment

hw10FirstNameLastName.txt

(and indicate whether it is OK to post)

  1. Write a procedure

    Canon(C)

    that inputs a cycle (a list of distinct numbers except the first and last entries that are the same) and outputs the same cycle, but with its smallest element appearing at the first entry. For example

    Canon([5,3,6,2,5]);

    should output [2,5,3,6,2] .

  2. Write a procedure

    InfoC(L,n,N,K)

    that inputs a Collatz-like rule L, phrased in terms of the symbol n, a positive integer N and a fairly large positive integer K, and returns FAIL if there exists an integer n1<=N whose orbit-length exceeds K, and otherwise returns the pair

    [[champ,record],Per]

    where champ is the integer <=N with the longest orbit, record is that record-length, and Per is the set of all periodic orbits written in canonical form. For example

    Info([3*n+1,n/2],n,100,1000);

    should return

    [[97, 119], {[1, 4, 2, 1]}]

  3. Using a five-fold do-loop over c1,c2,c3,c4,c5, find the values of

    Info([c1*(n+4)/5,c2*(n+3)/5, c3*(n+2)/5, c4*(n+1)/5, c5*n/5],n,4000,10000);

    for ALL

    1 ≤ c1 ≤ 4   1 ≤ c2 ≤ 4   1 ≤ c3 ≤ 4   1 ≤ c4 ≤ 4   6 ≤ c5 ≤ 11

    [Note added Feb. 25, 2016: if this takes too much time and space, restrict the range. Also it is wise not to allow c5=10, since this would obviously lead to FAIL.]

    Added Feb. 29, 2016: See the students' nice Solutions to the 10th homework assignment


    Programs done on Thurs. Feb. 25, 2016

    C11.txt , Contains procedures

    Homework for Feb. 25, 2016, class (due Sunday, Feb. 28, 10:00pm)

    Please email ShaloshBEkhad at gmail dot com a message with

    Subject: hw#11

    and an attachment

    hw11FirstNameLastName.txt

    (and indicate whether it is OK to post)

    1. Write a program that inputs integers D,M,Y where D is the day of the month (from 1 to 31), M is the Month (from 1 to 12) and Y is the year (any positive (or even negative)) integer and outputs an integer from 0 to 6 indicating the day of the week.

      What day of the week (according to our current calendar that was not yet used then) was Jesus' birthday? Your birthday? Dr. Z.'s birthday (July 2, 1950)?

    2. Clean up procedure IsP(T,n) so that the output would return the canonical form of the orbit (using Monday's homework Canon(C)), and that would return FAIL if you get the all-zero orbit.

    3. Write a program

      PO3(c1,c2,c3,m)

      that inputs integers c1, c2, c3 (NOT divisible by 3) and outputs all periodic orbits of length m for the Collatz-like rule

      L=[c1*(n+2)/3,c2*(n+1)/3, c3*n/3]

    4. Using PO3(c1,c2,c3,m), Write a program

      Champ3(m)

      that finds the (c1,c2,c3) with period of length m with the largest smallest element for

      1 ≤ c1,c2 ≤ 2   4 ≤ c3 ≤ 7

      and also returns that orbit.

      What are

      Champ3(2), Champ3(3), Champ3(4),Champ3(5)?

    5. Get ready for the next class by reading the wikipedia article about the Jacobian Conjecture

    Added Feb. 29, 2016: See the students' nice Solutions to the 11th homework assignment

    Programs done on Monday Feb. 29, 2016

    C12.txt , Contains procedures

    Homework for Feb. 29, 2016, class (due Sunday, March 6, 10:00pm)

    Please email ShaloshBEkhad at gmail dot com a message with

    Subject: hw#12

    and an attachment

    hw12FirstNameLastName.txt

    (and indicate whether it is OK to post)

    1. Write a short (one line) program

      Seq(f,z,N)

      that inputs the same parameters as Inv(f,z,N) (and uses it), and outputs the list of the first N coefficients of the inverse function of f. For example

      Seq(exp(z)-1,z,10);

      should output

      [1, -1/2, 1/3, -1/4, 1/5, -1/6, 1/7, -1/8, 1/9, -1/10]

    2. For which k (form 2 to 12) are

      Seq(z-z^k,z,100);

      in the OEIS? (once you kick out the zeroes).

    3. [Human Challenge] It is easy to see that the inverse function of f(z)=z-z^k (k integer, larger than 1), divided by z is a polynomial in z^(k-1). Using the OEIS (or, better still, human inspection) find out a closed-form formula, in terms of m and k, for the coefficient of z^(m*(k-1)+1) in the inverse function of f(z)=z-z^k, for SYMBOLIC m and k. Then using the Lagrange Inversion Formula, prove it rigorously.

    4. [Suggested by John Rogers]. It is well known, and easy to see that

      S_2(n):=1^2+2^2+ ... + n^2   ,

      equals

      n*(n+1)*(2*n+1)/6

      Conjecture a formula for the decimal representation of S_2(10^k), in terms of k, and then use Maple to prove your conjecture.

    5. More generally, let's say that a polynomial in n, P(n), that takes integers to integers, has the John Rogers property with respect to base b, if for every k, P(b^k), written in base b, does not have all the digits {0,...,b-1}. Write a procedure

      JohnRogers1(P,n,b,Maxk)

      that returns FAIL if all the b digits show up when k ranges from 1 to Maxk, and otherwise the set of missing digits.

      [Hint: use convert(...,base, b) .]

    6. Using JohnRogers1(P,n,b,Maxk), write a procedure

      JohnRogers(P,n,MaxB,Maxk)

      that inputs all the bases, from 2 to MaxB, that have the John Rogers property.

      What are the outputs to

      JohnRogers(sum(i^r,i=1..n),n,20,15)

      for r from 2 to 10?

    Added March 7, 2016: See the students' nice Solutions to the 12th homework assignment


    Programs done on Thursday, March 3, 2016

    C13.txt , Contains procedures

    Homework for March 3, 2016, class (due Sunday, March 6, 10:00pm)

    Please email ShaloshBEkhad at gmail dot com a message with

    Subject: hw#13

    and an attachment

    hw13FirstNameLastName.txt

    (and indicate whether it is OK to post)

    1. Carefully go over the code we wrote in this class, especially procedure Inv2(P,x,y,N), and make sure that you understand the math behind it.

    2. Write a three dimensional analog of Inv2(P,x,y,N), call it

      Inv3(P,x,y,z,N)

      that inputs a list, P, of lenght 3, [f(x,y,z),g(x,y,z), h(x,y,z)] and outputs the beginning (up to total degree N) of the inverse transformation (that consists of formal power series). Include a final step that applies procedure Comp(P,Q,x) to test that the output is indeed correct, or else return FAIL.

      [Hint: First write a procedure Chop3(P,x,y,z,i);]

      What are

      • Inv3([x-y^2-z^2,y-x^2-z^2,z-x^2-y^2],x,y,z,10);
      • Inv3([x-y^2-z^3,y-x^4-z^2,z-x^2-x*y-y^3],x,y,z,3);

    3. [Optional Challenge!] Write a general procedure

      Invk(P,x,N)

      that inputs a list, P, of length, k, say, a list x of variables (of the same length), say x=[x1,x2,.., xk], and the members of P are each polynomials in the variables [x1,..., xk], and outputs a list of length k that consists of the beginning (up to degree N) of the k components of the inverse transformation. What is

      Invk([x1-x2^2-x3^2-x4^2-x5^2, x2-x1^2-x3^2-x4^2-x5^2, x3-x1^2-x2^2-x4^2-x5^2, x4-x1^2-x2^2-x3^2-x5^2,x5-x1^2-x2^2-x3^2-x4^2],[x1,x2,x3,x4,x5],5);

      [Hint: First write a procedure

      Chopk(P,x,i)

      that inputs a polynomial in the list of variables x, and a positive integer i, and outputs the terms whose total degree is ≤ i (Hint-Squared: Use recursion)]

    Added March 7, 2016: See the students' nice Solutions to the 13th homework assignment


    Programs done on Monday, March 7, 2016

    C14.txt , Contains procedures

    Homework for March 7, 2016, class (due Saturday, March 12, 10:00pm)

    Please email ShaloshBEkhad at gmail dot com a message with

    Subject: hw#14

    and an attachment

    hw14FirstNameLastName.txt

    (and indicate whether it is OK to post)

    1. Write a procedure

      RandElem(x,MaxC,Maxr)

      that inputs a list of variables x, a large positive integer C, and a not-too-large (in applications) positive integer R, and first picks random 1 ≤ i ≠ j ≤ nops(x), then a random r between 1 and Maxr, then a random C between -MaxC and MaxC, and outputs the pair of transformations

      [Elem(x,C,i,j,r), Elem(x,-C,i,j,r)]

      (that are inverses of each other)

    2. Using RandElem(x,MaxC,Maxr) T times, write a procedure

      RandEpair(x,MaxC,Maxr,T)

      and outputs a pair of transformations, inverses of each other.

      Hint: Use Comp(P,Q,x) many times, in both directions.

      More detailed hint (Added March 12, 2016): Prepare the list of T pairs of elementary transformations and their inverses, let'd denote them like this (in humanese)

      [[E1,E1^(-1)], ..., [ET,ET^(-1)]

      then the forward transformation is

      E1E2 ... ET

      and its inverse is

      ET^(-1) ... E1^(-1)

      Calling the output pair P, check that indeed both Comp(P[1],P[2],x) and Comp(P[2],P[1],x) are the identity mapping x.

    3. Verify that

      Invk(P[1],x,N)=P[2]

      where N is sufficiently large, for several random outputs of P:=RandEpair([x,y,z,w],10,5,4);

    4. [Unrelated Optional Challenge, 10 dollars to be divided]

      [Note: this is a first step in solving a Battleship puzzle]

      Write a procedure

      ZeroOneMatrices(RowSums,ColumnSums)

      that inputs lists of non-negative integers RowSums, ColumnSums, of lengtha m, and n, say (i.e. nops(RowSums)=m, nops(ColumnSums)=n) and such that they have the same sum (k, say, if not it returns FAIL), and outputs the set of m by n 0-1 matrices (given as lists-of-lists) whose row sums are given by the list RowSums and whose column-sums are given by the list ColumnSums.

      Hint: First write a procedure Vecs(n,k) that inputs positive integers n and k and outputs the set of 0-1 vectors (given as lists) of length n that add-up to k (or equivalently, have k 1's and n-k 0's. Use recursion. Then for the main procedure, also use recursion, the base case is with one row, and then finding all the legal options for the bottom row, and calling the same procedure, with modified RowSums and ColumnSums for each choice, and taking the union.

      What is the set

      ZeroOneMatrices([1,1,1,1],[1,1,1,1])?

      Which of the following sequences are in the OEIS?

      • seq(nops(ZeroOneMatrices([1$i],[1$i]),i=1..6);
      • seq(nops(ZeroOneMatrices([2$i],[2$i]),i=1..5);
      • seq(nops(ZeroOneMatrices([3$i],[3$i]),i=1..5);
      • seq(nops(ZeroOneMatrices([2$i],[i,i]),i=1..5);
      • seq(nops(ZeroOneMatrices([3$i],[i,i,i]),i=1..5);

    Added March 20, 2016: See the students' nice Solutions to the 14th homework assignment


    Programs done on Thursday, March 10, 2016

    Today we celebrated π day four days early (since there are no classes next week, because of Spring break).

    C15.txt , Contains procedures

    Homework for March 10, 2016, class (due Saturday, March 12, 10:00pm)

    Please email ShaloshBEkhad at gmail dot com a message with

    Subject: hw#15

    and an attachment

    hw15FirstNameLastName.txt

    (and indicate whether it is OK to post)

    1. Write a procedure

      JGbetter(N)

      that implements the still unproved (byt absolutely certain) second formula in Jesus Guillera's homepage that used the PSLQ, and verify that indeed increasing N by one gives you five more decimal places.

    2. Write a procedure

      FindMachin(x,k)

      that inputs x and outputs the only y such that

      AT([x$k,y])=1.

      What

      FindMachin(1/5,4)?

    3. Write a procedure

      BestMachin(k,N)

      that tries out all x=1/r, from from 1 to N, and outputs the "best" Machin-like formula

      AT([x$k,y])=1

      with min(x,y) as small as possible.

    4. [Optional Human Challenge] Prove that if A(n) is the number of up-down permutations of length n, then

      Sum(A(n)*x^n/n!,n=0..infinity)=sec(x)+ tan(x)

      Note that this implies that the limit of A(n)/(A(n-1)*n) as n goes to infinity is 2/Pi, since the radius of convergence of sec(x)+tan(x) is Pi/2 (why?)

    5. [Optional Contest, the best entry will get a π T-shirt]

      Find a natural infinite power series that converges as slow as possible to π

      [Remark: here is an example of an unnatural series

      4*Sum((-1)^i/(2*i+1)+ Sum((-1)^j,j=0..10^1000000000), i=1..infinity)]

    6. [Optional Human Challenge, 100 dollars] Find a mathematical proof of the above-mentioned formula in Jesus Guillera.

      Added March 20, 2016: See the students' nice Solutions to the 15th homework assignment


    Programs done on Monday, March 21, 2016

    C16.txt , Contains procedures

    Homework for Monday, March 21, 2016, class (due (excpet for the first problem) Sunday, March 27, 10:00pm)

    Please email ShaloshBEkhad at gmail dot com a message with

    Subject: hw#16

    and an attachment

    hw16FirstNameLastName.txt

    (and indicate whether it is OK to post)

    1. [Due Thurs., March 24, 2016, 11:00am] Read the wikipedia entry on Hofstadter sequences.

    2. Write a procedure

      FindTrans(m,n,x,y)

      That inputs positive integers m and n, and outputs the set of polynomial transformations (possibly given symbolically)

      (x,y) -> [P(x,y),Q(x,y)]

      where the degree of P(x,y) is m, the degree of Q(x,m) is n, and the leading parts of P(x,y) and Q(x,y) are xm and xn respectively

      [In other words, P(x,y)=xm + SomePolynomialOfDegree(<=m-1), Q(x,y)=xn + SomePolynomialOfDegree(<=n-1)],

      whose Jacobian determinant is identically equal to 1.

      What are FindTrans(2,1,x,y), FindTrans(3,2,x,y)?

    3. Using FindTrans(m,n,x,y) as a subroutine , write a procedure

      ProveTameConj(M)

      that rigorously proves that if m < n ≤ M, and n/m is NOT an integer, then there do not exist a polynomial transformation in two variables [P(x,y),Q(x,y)] where the degree of P(x,y) is m, and its leading part is xm, and the degree of Q(x,y) is n, and its leading part is xn. It should input true, or a counterexample.

      What is the largest M for which your computer can do it in reasonable time?

      [Note: ProveTameConj(∞) is (almost) a proof of the tame-generator conjecture that implies the Jacobian conjecture. To get a full proof, you have to consider (for the cases where m and n are not relatively prime), more general leading terms ]

    4. Using Maple, completely solve Problem 11889 in the February 2016 issue of the Amer. Math. Monthly.

      [Hint: replace sin(x)^2 by y, then cos(x)^2 is 1-y. using the Maple command "limit", find the required limit for y of the form 1/m, where m is an integer. Find the pattern, and determine a symbolic expression, in terms of y, for that limit. Finally replace y by sin(x)^2 to get the answer].

      Program bn(x) for numerical integer n and numerical floating point x, and verify that bn(x) is close to what you found above for large n. How fast (or slow) is the convergence?

    5. Completely solve Problem 11890 in the February 2016 issue of the Amer. Math. Monthly.

      [Hints: arctanh(z)=z+z^3/3+z^5/5+z^7/7+ ...;   arctanh(x)+arctanh(y)=arctanh((x+y)/(1+x*y));  Maple knows how to evaluate the right side, and tanh(arcsinh(z)/2) simplifies to a certain algebraic expression in z, that you can either derive directly, using hyperbolic trig, or better still, doing identify(evalf( tanh(arcsinh(n)/2))) for n=2,3,4,5,6 and guessing the expression].

    Added March 28, 2016: See the students' nice Solutions to the 16th homework assignment


    Programs done on Thursday, March 24, 2016

    C17.txt , Contains procedures

    Homework for Thursday, March 24, 2016, class (due (excpet for the first problem) Sunday, March 27, 10:00pm)

    Please email ShaloshBEkhad at gmail dot com a message with

    Subject: hw#17

    and an attachment

    hw17FirstNameLastName.txt

    (and indicate whether it is OK to post)

    1. Write little programs verifying, empirically, all the claims in the wikipedia article about Shapiro polynomials.

    2. [Optional human challenge] prove as many of them rigorously, using induction or otherwise.

    3. [Optional challenge, 10 dollars, to be divided [if necessary], I don't know the answer]
      Using GRc, and sufficiently many terms of the sequence, Find linear recurrence equations with constant coefficients satisfied by the the sequence HM(n,r) for r=4 (i.e. the integral of the 8-th power of |P_k(x)|^8

    4. [Optional human challenge] prove rigorously the recurrences for r=1, r=2, and r=3, using induction or otherwise.

    Added March 28, 2016: See the students' nice Solutions to the 17th homework assignment


    Programs done on Monday, March 28, 2016

    Guest co-Lecturer:Nathan Fox .

    C18.txt , Contains procedures


    Homework for Monday, March 28, 2016, class, (due Sunday, April 3, 10:00pm)

    Please email ShaloshBEkhad at gmail dot com a message with

    Subject: hw#18

    and an attachment

    hw18FirstNameLastName.txt

    (and indicate whether it is OK to post)

    1. Write programs SeqR(N), and SeqS(N) (that depend on each other) that input a positive integer N and output the first N terms of the sequences R(n) and S(n) in the wikipedia article on Hofstadter's equences, verify that they agree with A005228 and A030124.

    2. Write a program SeqG(N) that inputs a positive integer N and outputs the first N terms of the sequence G(n) in the wikipedia article on Hofstadter's sequences, verify that they agree with A005206. Read the comment there and convince yourself that it is true.

    3. Write a program SeqH(N) that inputs a positive integer N and outputs the first N terms of the sequence H(n) in the wikipedia article on Hofstadter's sequences, verify that they agree with A005374.

    4. Write programs SeqF(N), and SeqM(N) (that depend on each other) that input a positive integer N and outputs the first N terms of the sequence F(n) and M(n) in the wikipedia article on Hofstadter's sequences, verify that they agree with A005378 and A005379.

    5. Write a program SeqQrs(r,s,N) that inputs positive integers r and s, a positive integer N and outputs the first N terms of the Hofstadter-Huber Qr,s(n) sequence defined in the wikipedia article on Hofstadter's sequences, experiment with various r and s, and confirm that for (r,s)=(1,4) and (r,s)=(2,4) they do not die (at least they do not die young).

    6. Write a program Seqa(N) that inputs a positive integer N and outputs the first N terms of the Hofsadter-Conway sequence a(n) in the wikipedia article on Hofstadter's sequences, verify that they agree with A004001. Verify empirically that a(n)/n tends to 1/2 as n goes to infinity.

    7. [Optional Human Challenge] Prove, by hand, that Nathan Fox's formula for his sequence indeed satisfies the Hofstadter Q-recurrence, with the more liberal convention (given by QgZ) and the indicated initial conditions.

    Added April 4, 2016: See the students' nice Solutions to the 18th homework assignment


    Programs done on Thursday, March 31, 2016

    C19.txt , Contains procedures

    Homework for Thursday, March 31, 2016, class (due Sunday, April 3, 10:00pm)

    Please email ShaloshBEkhad at gmail dot com a message with

    Subject: hw#19

    and an attachment

    hw19FirstNameLastName.txt

    (and indicate whether it is OK to post)

    1. Using Maple's plot function(s), write a program

      PlotWalk(W)

      that inputs a walk in the 2D square-lattice and outputs a picture of it.

    2. Write a program

      RandSAW(n)

      that inputs a positive integer n, and outputs a random self-avoiding walk with n steps, or FAIL if it gets stuck. It does not have to be guaranteed to be uniformly-at-random.

      [Hint: At every step, find out the neighbors that are not yet visited, and pick one of them uniformly at random].

    3. Combine PlotWalk(W) and RandSAW(n) to write a program

      PlotRandSAW(n)

      that plots a random self-avoiding walk

    4. Look up in the OEIS and/or wikipedia the sequences for self-avoiding walks in the triangular and hexagonal lattice, and for the number of polyominos (aka "lattice animals"). Find as many terms as you can, and estimate the C, mu, and theta such that a(n) is asymptotically C*mu^n*n^theta, using procedure EstimatePars(L) from class.

    5. Using the bulit-in Maple command, "sum", solve AMM problem 11897 (March 2016)

    6. Solve Monthly probelm 11899 (March 2016), by first combining the two sums on the left into a single sum from k=0 to k=2n, plus a left-over term. Then use Maple's sum command (you don't even need Zeilberger!) to prove it.

    7. [Optional Challenge] Solve, or at least investigate, as many problems as you can from the March 2016 issue of the American Mathematical Monthly

    8. Read the wikipedia entry on Boolean satisfiability problem

    Added April 4, 2016: See the students' nice Solutions to the 19th homework assignment


    Programs done on Monday, April 4, 2016

    Today we studied the Boolean satisfiability problem

    C20.txt

    Contains procedures


    Homework for Monday, April 4, 2016, class (due Sunday, April 10, 10:00pm)

    Please email ShaloshBEkhad at gmail dot com a message with

    Subject: hw#20

    and an attachment

    hw20FirstNameLastName.txt

    1. Modify procedure SAT(F,x,n) and write a procedure

      AllSATS(F,x,n)

      that inputs a Boolean expression F in x[1], ..., x[n], and outputs the set of all vectors in {false,true}^n that satisfy the expression. For example

      AllSATS(x[1] or x[2] ,x,2)

      should output the set {[true,true],[true,false],[false,true]}

    2. Write a procedureE

      AveTime(n,r,K,HowMany)

      that inputs positive integers n,r,and K, and outputs the average time it takes to run SAT(RCNF(x,n,r,K))

      when it is execeuted HowMany times.

      (Hint, use: time( SAT(RCNF(x,n,r,K))) HowMany times and take the average time)

    3. Write a procedure

      TimePlotSAT(r,M,Maxn, HowMany)

      that inputs positive integers r, M, Maxn, and HowMany, and outputs a plot of the average running time

      of SAT(RCNF(x,n,r,M*n)) over HowMany runs

      for n from 1 to Maxn.

      What are the plots of

      • TimePlotSAT(3,2,30, 100)
      • TimePlotSAT(3,3,30, 100)
      • TimePlotSAT(3,4,30, 100)
      • TimePlotSAT(4,3,30, 100)
      • TimePlotSAT(4,4,30, 100)
      [Note: I did not test the above procedures, if they take too long to run, make Maxn smaller]

    Added April 11, 2016: See the students' nice Solutions to the 20th homework assignment


    Activity done on Thursday, April 7, 2016

    Today we had a "field trip" to attend Zeev Rudnick's fascinating talk

    Homework for Thursday, April 7, 2016, class (due Sunday, April 10, 10:00pm)

    Please email ShaloshBEkhad at gmail dot com a message with

    Subject: hw#21

    and an attachment

    hw21FirstNameLastName.txt

    1. Write a procedure

      Zeev(a,N)

      that inputs an irrational number a, and a positive integer N and outputs the sorted list of all numbers of the form a*m2+n2 that are ≤ N, given as floating point numbers, use Digits=20 .

    2. Using procedure Zeev(a,N), write a procedure

      Rudnick(a,N)

      that inputs an irrational number a, and an integer N, and outputs the quantity

      δamin(N) defined in page 11 of Zeev Rudnick's talk. Confrim the claimed inequality for fairly large N, say N=10000, and N=20000.

    3. Write a procedure

      GenSeq:=proc(f,x,N)

      that inputs a rational function f in the variable x and a positive integer N, and outputs the sequence of Maclaurin coefficients (i.e. Taylor coefficients around x=0) from the coefficient of x to the coefficient of xN.

      For example,

      GenSeq(x/(1-x-x^2),x,100);

      should give the first 100 Fibonacci numbers.

    4. Write a procedure

      CheckLucas(L)

      that inputs a sequence of positive integers, L, and outputs true iff the Lucas property

      gcd(L[m],L[n])=L[gcd(m,n)]

      holds for all 1 ≤ m < n ≤ N.

      What are

      • CheckLucas(GenSeq(x/(1-x-x^2),x,100));
      • CheckLucas(GenSeq(x/(1-4*x-11*x^2),x,100));
      • CheckLucas(GenSeq(x/(1-6*x-7*x^2),x,100));
      • CheckLucas(GenSeq(x/(1-x-x^3),x,100));

    5. [Optional Human challenge] Prove that the Lucas property holds for all sequences of the form

      GenSeq(x/(1-a*x-b*x^2),x,infinity);

      for a and b relatively prime positive integers.

      [Added April 8, 2018: the original statement (posted yesterday), erroneously, did not mention that a and b must be relatively prime. I thank Zeev Rudnick for making this correction, and he won 1 dollar].

    6. [Optional Human challenge] Who are the two Billiard players on p.4 of Zeev Rudnick's talk.

    7. [Optional Computational Challenge]

      Confirm empirically the asymptotic inequality, for the eighth moment of the Riemann Zeta function on p. 17 of Zeev Rudnick's talk.

      [Warning, you have to take T fairly large to start getting small numbers (relatively to T), since the left side is supposed to be (assuming RH) about (log T)16 (see p.12 of Chris Hughes's talk)].

    Added April 11, 2016: See the students' nice Solutions to the 21th homework assignment


    Programs done on Monday, April 11, 2016

    Today we continued to study Boolean satisfiability problem, but from the dual perspective of Disjunctive Normal Forms, and deciding whether or not they are tautologies.

    C22.txt

    Contains procedures

    Homework for Monday, April 11, 2016, class (due Sunday, April 17, 10:00pm)

    Please email ShaloshBEkhad at gmail dot com a message with

    Subject: hw#22

    and an attachment

    hw22FirstNameLastName.txt

    ALSO, Please, HAVE in the first line

    #FirstName LastName, HOMEWORK 22, OK (or NOT OK) to POST

    1. Write a procedure:

      HowManyPoints(n,r,K,L,t)

      that inputs a positive integer n, a positive integer r, a positive integer K, and a large positive integer L, and a symbol t, and outputs the sum of

      tnops(TF(RDNF(n,r,K))

      when RDNF(n,r,K) is run L times. Note that the coefficient of t2n tells you how many out of these L random DNFs happen to be tautologies

      What do you get from

      • HowManyPoints(10,3,5,1000,t)
      • HowManyPoints(10,3,20,1000,t)
      • HowManyPoints(10,3,80,1000,t)
    2. Write a procedure

      HowManyTaut(n,r,MaxK,L)

      that for each K from 1 to MaxK runs RDNF(n,r,K) L times, finds the ratio of those that are tautologies and outputs the list, of length, MaxK, whose i-th entry is that ratio for running RDNF(n,r,K) L times.

      Note: Of course, every time you run it you would different answers, since things are random, but if L is large enough you should close answers (by the law of large numbers)

      What do you get from

      • HowManyTaut(10,3,100,100)
      • HowManyTaut(10,4,100,100)

    Added April 18, 2016: See the students' nice Solutions to the 22nd homework assignment


    Programs done on Thursday, April 14, 2016

    Today we are continued to study Boolean satisfiability problem, but from the dual perspective of Disjunctive Normal Forms, and deciding whether or not they are tautologies. We used a counting approach based on the Bonferroni inequalities.

    C23.txt

    Contains all the procedures of C22.txt (see Help22(); for a list) as well as the new procedures:

    Homework for Thursday, April 14, 2016, class (due Sunday, April 17, 10:00pm)

    Please email ShaloshBEkhad at gmail dot com a message with

    Subject: hw#23

    and an attachment

    hw23FirstNameLastName.txt

    ALSO, Please, HAVE in the first line

    #FirstName LastName, HOMEWORK 23, OK (or NOT OK) to POST

    1. Carefully go over the extra procedure IsTb(f,n) in C23.txt, that I wrote after class, and convince yourself that it works, using the Bonferroni inequalities

    2. Write a procedure

      GettingOut(n,r,K,L)

      that calls RDNF(n,r,K) L times, and outputs a list, let's call it Data, of length K, such that for i from 1 to K, L[i] is the number of times the second output to IsTb(f,n), what is called k there, happens to be i. Of course the list, Data, should add-up to L. Also plot the histogram i->Data[i].

      [Of course, since RDNF(n,r,K) is random, you would get different answers each time, but for large L you should be able to see the trend.]

      What did you get for

      • GettingOut(5,3,10,2000)
      • GettingOut(10,3,15,200)
      • GettingOut(20,3,10,200)
      • GettingOut(40,3,10,200)

      In each case plot the corresponding histogram to see what is going on.

    3. Using procedure

      ZeroOneMatrices(RowSums,ColumnSums)

      that you did in homework 14,

      Write a program

      SolveBattleship(RowSums,ColumnSums,SetOfAlreadyCovered Locations,NumberOfSubmarines,NumberOfDestoyers,NumberOfCruisers)

      that solves any Battleship puzzle. Apply your program to solve

      this puzzle, stolen from a recent New York Times magazine.

    4. Get ready for next class (and the upcoming movie, "The man who knew infinity") by reading the wikipedia articles about partitions and Ramanujan Congruences.

    Added April 18, 2016: See the students' nice Solutions to the 23rd homework assignment


    Activity done on Monday, April 18, 2016

    We first discussed the class group project, and here is some very rudimentary, Maple code written by Dr. Z.: C24.txt

    [See Help(); for a list of the procedures, and the comments to them]

    Homework for Monday, April 18, 2016, class (due Sunday, April 24, 10:00pm)

    Please email ShaloshBEkhad at gmail dot com a message with

    Subject: hw#24

    and an attachment

    hw24FirstNameLastName.txt

    ALSO, Please, HAVE in the first line

    #FirstName LastName, HOMEWORK 24, OK (or NOT OK) to POST

    1. Without peeking here, finish up Fabian Franklin's gorgeous combinatorial proof of Euler's pentagonal number theorem.

    2. Write a procedure

      Franklin(L)

      that inputs a partition into distinct parts (given as a decreasing list of positive integers) and outputs its image, under the Franklin mapping, if its exists, or else returns FAIL.

    3. Write a procedure

      DP(n)

      that inputs a non-negative integer n, and outputs the set of partitions of n into distinct parts. For example, DP(4) should output {[4],[3,1]}.

    4. Write a procedure

      CheckFranklin(n)

      that verifies that for every member, L, of DP(n) for which Franklin(L) is not FAIL, Franklin(Franklin(L))=L. In other words, that the Franklin map is an involution on its domain.

    5. Implement, in Maple, the gorgeous Bressoud-Zeilberger proof from the book of Euler's partition recurrence. In other words Write a Maple procedure

      BressoudZeilberger(L,j)

      that inputs an integer partition L (written as a weakly-decreasing list of positive integers) and an integer j (that may be negative, zero, or positive), and outputs another such pair L1,j1, where j1 is either j+1 or j-1, as the case may be, and such that convert(L,`+`)+ a(j)=convert(L1,`+`)+ a(j1), where a(j)=(3j2 +j)/2 (as in the above B-Z paper).

      Check that your program agrees with the example given in that paper.

    Added April 25, 2016: See the students' nice Solutions to the 24th homework assignment


    Programs done on Thursday, April 21, 2016

    Today we continued to study the mathematical heritage of Srinivasa Ramanujan, in preparation of the upcoming film "The man who knew infinity".

    C25.txt

    Contains procedures

    Homework for Thursday, April 21, 2016, class (due Sunday, April 24, 10:00pm)

    Please email ShaloshBEkhad at gmail dot com a message with

    Subject: hw#25

    and an attachment

    hw25FirstNameLastName.txt

    ALSO, Please, HAVE in the first line

    #FirstName LastName, HOMEWORK 25, OK (or NOT OK) to POST

    1. Write a program

      HRR(n)

      That inputs a positive integer and computes p(n) using the famous Hardy-Ramanujan-Rademacher formula, cited, for example in the wikipedia entry on partitions

      Hint: you first have to write a little procedure to compute Dedekind sums. You quit the summation as soon as the terms are way below one.

      Use HRR(n), to write a procdure SeqHRR(N) that should output the same as SeqP(N) we did in class. What is faster? for large N? What is faster, p(10000) or HRR(10000)?

    2. Write a procedure

      RamanujanStyleMiracles(R,S,N)

      that inputs positive integers R, S, and N, finds the set of all quadruples

      [r,s,p1,j]

      with r ≤ R, s ≤ S, such that the sequence A(r,s)(n), defined by the generating function

      Sum(A(r,s)(n)*q^n,n=0..infinity)= mul(1+q^i,i=1..infinity)^r/(mul(1-q^i,i=1..infinity))^s

      (conjecturally, using FindRC(L) with a list of N terms) seems to satisfy the congruence relation

      A(r,s)(p1*n+j) == 0 (mod p1)

      What is

      RamanujanStyleMiracles(5,5,300)?

      Added April 25, 2016: See Dr. Silviu Radu's very interesting message that pointed out to this interesting paper by Dennis Eichhorn and Ken Ono (an associate producer of the upcoming movie "The man who knew infinity")

    Added April 25, 2016: See the students' nice Solutions to the 25th homework assignment


    Programs done on Monday, April 25, 2016

    Today we learned how to write a computer-generated mathematical article.

    C26.txt

    [Note: A few minor corrections and additions have been added after class.]

    Contains procedures

    Homework for Monday, April 25, 2016, class (due 10:00pm, May 4, 2016)

    Work on the class project to develop a Logic puzzle webbook inspired by the NP-hard Satisfiability problem.


    Programs done on Monday, April 25, 2016

    Today we learned how to discover Roger-Ramanujan style identities, and verified the amazing still open Kanade-Russell partition identities.

    C27.txt

    [Note: A few minor corrections and additions have been added after class. In particular MS(n) now works correctly]

    Contains procedures

    Homework for Thursday April 28, 2016, class (due Sunday, May 1, 10:00pm)

    Please email ShaloshBEkhad at gmail dot com a message with

    Subject: hw#27

    and an attachment

    hw27FirstNameLastName.txt

    ALSO, Please, HAVE in the first line

    #FirstName LastName, HOMEWORK 27, OK (or NOT OK) to POST

    1. Write analogs of procedure MS(n) for handling identities I2 - I6 in section 4 (pp. 5-6) of the Kanade-Russell masterpiece and verify them for n ≤ 100.

    2. [Optional Human (or machine!) Challenge, $100 for each] Give mathematical proofs to identities I1 - I6.

    Added May 2, 2016: See the students' nice Solutions to the 27th homework assignment


    Activity done on Monday, May 2, 2016

    Guru Neil Sloane gave a great guest lecture


    Added May 5, 2016: See the great class project


    Dr. Z.'s teaching page