7

Consider the set of all numbers which are divisible by all natural numbers not exceeding their square root, and denote this set by $S_2=\{1,2,3,4,6,8,12,24\}$ (Here the subscript indicates that we're taking the 2nd root of the numbers). Thus $|S_2|=8$.

Similarly, the set of all numbers which are divisible by all natural numbers not exceeding the cube root is $S_3 = \{1,2,3,4,5,6,7,8,10,12,14,16,18,20,22,24,26,30,36,42,48,54,60,72,84,96,108,120,‌​180,240,300,420\}$, with $|S_3|=32$.

Now define $S_r$ similarly as the set of all positive numbers divisible by all the naturals not exceeding their $r^{th}$ roots. Then I have the folowing questions:

Q-1 What is the general formula for finding $|S_r|$ (ie. Cardinality of $S_r$)?

Q-2 Is there an expression for the greatest element of $S_r$?

Asymptotics will also be encouraged.

Shivam Patel
  • 4,012

2 Answers2

2

I don't have asymptotics, but I coded this quick program

a(n)=my(s,old,cur,mult=1,k);while(mult<=2*(cur=(k+++1)^n-1)+9,mult=lcm(mult,k);s+=cur\mult-old\mult;old=cur);s

in PARI/GP and it finds $|S_1|=2, |S_2|=8, |S_3|=32, |S_4|=149, \ldots, |S_{1000}|\approx1.8077655\cdot10^{2571}$

which suggests that $|S_n|$ grows at roughly a factorial rate.

Charles
  • 32,122
  • Thankyou for this code , But I don't know anything much about PARI/GP and where to run the code in my pc? I read it is a C library , can you please help me , in writing this as a functioning C code . Thanks – Shivam Patel May 20 '14 at 04:10
  • @ShivamPatel That's a very specific request - what do you need these values for? is there a particular reason you need this as C code? – Steven Stadnicki May 20 '14 at 04:14
  • @StevenStadnicki Just for fun, as a curiosity , so that I can see all those values in front of my eyes – Shivam Patel May 20 '14 at 04:15
  • @ShivamPatel: If you go to the link you can find a PARI/GP download for Windows. You could also hand-translate into C, although it would only work for small numbers. – Charles May 20 '14 at 04:16
  • And Charles: out of curiosity, do you have any idea how Pari/GP would have estimated $|S_{1000}|$? I'm wondering whether that estimate might be able to be turned into an explicit or semi-explicit formula... – Steven Stadnicki May 20 '14 at 04:16
  • 1
    @StevenStadnicki: I didn't estimate, I computed the exact value. I just didn't want to paste thousands of digits into my answer. – Charles May 20 '14 at 04:17
  • @StevenStadnicki But I don't think there could be a explicit formula , seems like an NP problem . But let us hope for the best – Shivam Patel May 20 '14 at 04:19
  • Ahhh, all right (and yeah, that's probably prudent... :-) ) I'm trying to digest the algorithm, though I admit it's been quite a while since I've used the software myself. While there might not be any explicit formula, it seems very plausible to me that full asymptotics could be extracted from this technique. Very neatly done! – Steven Stadnicki May 20 '14 at 04:23
  • @StevenStadnicki: Yes, I think one probably could. – Charles May 20 '14 at 04:27
  • @StevenStadnicki , But how? – Shivam Patel May 20 '14 at 04:29
2

It's quite easy to calculate if you turn things around: Divisible by 1 = every number. Divisible by 2 = multiple of 2. Divisible by 1, 2, 3 = multiple of 6. Divisible by 1 to 4 = multiple of 12. Divisible by 1 to 5 or 1 to 6 = multiple of 60 etc.

You don't really need PARI/GP, it's quite trivial: For n from 1 upwards you calculate L(n) = "LCM of the numbers 1 to n". L (1) is 1 obviously, and you multiple the previous value by p if n is a power of the prime p. The result is not far from $e^n$.

Then you calculate how many of the numbers $n^r <= x < (n+1)^r$ are divisible by L (n), which is $((n+1)^r - 1) / L(n) - (n^r - 1) / L(n)$, both divisions rounded down. $n^r$ grows only polynomial, not exponential, so this will become zero quite soon. (For example n = 41 when r = 10).

$n^r/e^n$ has its maximum roughly around n = r, where $n^r/e^n = r^r/e^r$ which is not far from Stirling's formula for r!. So very roughly the result is about r!.

gnasher729
  • 10,113