Discussion Room : IDC101

Challenging Problems

Challenging Problems

by Kapil Paranjape -
Number of replies: 1

Those who feel that this course is "too easy" may want to take up the (significantly) more difficult challenges at Project Euler.

Note that solutions can be "downloaded" from the net and doing that will run the risk of not learning anything!

In reply to Kapil Paranjape

Re: Challenging Problems

by Dr. Amit Kulshrestha -

Let me pose a problem here. I am not sure if it is there on Project Euler, but I am sure Project Euler has many problems which have similar taste.

Consider the function \pi, where \pi(n) is the number of primes \leq n. Denote \pi^2(n) = \pi(\pi(n)), \pi^3(n) = \pi(\pi(\pi(n))), and so on. This gives a strictly decreasing sequence, and hence \pi^r(n) = 2 for some r. This r depends on n. I would take a liberty to call this r the \pi-length of n and the sequence \pi(n), \pi^2(n), \pi^3(n), \cdots, \pi^2(n) = 2, the \pi-sequence of n?

Now I can ask several questions.

  1. Find a prime number whose \pi-sequence consists only of prime numbers? Larger the better!
  2. Find a natural number whose \pi-sequence contains no prime other than 2. Again, larger the better.
  3. Among the natural numbers \leq 10000, which one has largest \pi-length?
  4. Plot the function \pi-length.

I am sure you may also ask plenty of questions based on this.

Enjoy Pythoning!