quickfur wrote:All this talk about math reminds me of some of the stuff I used to do. One time, I wrote a program to calculate a "subfactorial": SubFac(n) is defined to be the smallest number divisible by all integers 1 to n. It coincides with the factorial for the first few numbers, then loses out pretty quickly. I found out that SubFac increases in leaps: it'd jump by a large factor when you pass a prime, and sometimes it stays still when you go through several consecutive numbers with factors that have already occurred before, before it jumps again at the next new factor.
That sounds interesting. So SubFac(n) = Lcm(1,2,...,n)? Is there a simple formula?
I often look at numbers with lots of factors using a kind of grid to show factors graphically. On the first row, a dot exists at every point, because every number is divisible by 1. On the second row, every second column is a dot. On the nth row, a point exists at every nth column. I think there's an example somewhere on mathworld, but I can't find it.
- Code: Select all
6 . . . . . . . . . . . .
5 . . . . . . . . . . . . . . .
4 . . . . . . . . . . . . . . . . . . .
3 . . . . . . . . . . . . . . . . . . . . . . . . . .
2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.................................................................................
^
With this kind of graph, you can identify special numbers simply by looking at them. A prime occurs when a column is empty, apart from 1. Numbers like factorials and subfactorials appear as an unbroken upward line. Every straight line like this appears in the middle of a "flower".
This means there are two straight diagonal lines either side of the column. (The flower at 60 is shown by the ^ above)
For instance, 6!=720 is divisible by 2,3,4,5 and 6.
But look at the numbers next to it.
720-1 = 719, is prime. 720-2 =718, divisible by 2. 720-3 = 717, div. by 3,
and so on. It works up to six, on both sides of the number (except 721 isn't prime, but it has no factors less than 6)
The pattern has an interesting structure of flowers at the bottom, things that look like parabolas higher up, and finally, straight diagonal lines.
Your second idea is interesting too. Is this what you mean?
- Code: Select all
[0 1]^n [1] = Phi *F[sub]n+2[/sub]
[1 1] [1] F[sub]n+2[/sub]
How do you go from there to get the formula?