Archive for December, 2009

Proving There are Only Six Dudeney Numbers

Thursday, December 24th, 2009

I came across an article in Wikipedia about Dudeney numbers. These are numbers whose digit sum add up to their cube root:

    1 =  1 x  1 x  1   ;   1 = 1
  512 =  8 x  8 x  8   ;   8 = 5 + 1 + 2
 4913 = 17 x 17 x 17   ;  17 = 4 + 9 + 1 + 3
 5832 = 18 x 18 x 18   ;  18 = 5 + 8 + 3 + 2
17576 = 26 x 26 x 26   ;  26 = 1 + 7 + 5 + 7 + 6
19683 = 27 x 27 x 27   ;  27 = 1 + 9 + 6 + 8 + 3

The wiki page went on to proclaim that those are the only six such numbers. Somebody on the talk page asked where the proof was.

I poked on Google and didn’t find anything, so I wondered if I could just prove it myself. Here’s what I came up with off the cuff. Perhaps others would find it interesting.

(more…)

.Trashes, .fseventsd, and .Spotlight-V100

Wednesday, December 2nd, 2009

Merely plugging a removable drive into a mac (when it has write access) makes OS/X think it can take the liberty to write a lot of hidden garbage onto that disk. If you want to stop this from happening, you have to put some special files on that disk before you plug it in.

To stop OS/X from doing Spotlight indexing, you need a file called .metadata_never_index in the root directory of the removable drive.

To stop OS/X from making a .Trashes directory, you need to make your own file that *isn’t* a directory and call it .Trashes

To keep it from doing logging of filesystem events on the drive, you need to make a directory called .fseventsd and inside that folder put a single file named no_log

The contents of these files don’t matter, so you can make them empty files using touch. Even better, you could make it a text file with a link to this post, so that you (or someone else) wandering across the files will know what they’re for.

Apple’s choice to do this is incredibly self-serving and shameful. At bare minimum, hidden files and features like these should be off by default for any non-mac-only filesystem formats. They should only be enabled when the user has been made aware of them.


Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported