journal
all ![]() | Rob is 20,117 days old today. |
Feb 2005 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Apr 2005 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2004 jan feb mar apr may jun jul aug sep oct nov dec
2006 jan feb mar apr may jun jul aug sep oct nov dec |< << more >> >| |
Entries this day: AM Work perfect_numbers AM 1:48pm JST Tuesday 15 March 2005 I've heard from Sally. She was 100% cool and I'm really relieved but not surprised. I downloaded Discovery Channel's _SUPERMASSIVE BLACK HOLES_ via bittorrent. It was pretty good, but didn't really tell me anything new. Just one bit about how heated gas falling into a black hole could trigger star formation; I hadn't thought about that before. Also downloaded some Simpson's and Southpark episodes, but haven't watched them yet. news.google.com now allows layout customization. Mine current layout is here. "me!" shows news items with "Rob Nugen" in them, but right now there are none. permalinkWork 7:17pm JST Tuesday 15 March 2005 Today has been zooming by. 4 lessons down and 4 to go. Sadly, the first two lessons were a double blue booking noshow by Motoko, who is really cool and looks just like Barbie. And by Barbie, I mean my cousin Barbie who is beautiful but looks nothing like Mattel's Barbie(tm) doll. Second (third) lesson was with a high level guy who knew that Fermat's Last Theorem was proved 10 years ago. Most recent lesson was with Kimiko, who I have fantasized about kissing, but have successfully not given her my contact information. Even when she gave me a dirty look after I told her today is my last day. I have realized something after two years of teaching in Japan. I'm more often attracted to the low level English speakers partly|primarily because the verbal communication gap lends itself to using the language of love instead. What a great thing to figure out on my last day. 12:00am My last four lessons were equally lovely. I had Sachiko for the first two, during which we spent a fair amount of time looking at the code for perfect numbers and finished 1.5 lessons worth in the book. I hope she wasn't feigning when she said she didn't mind the amount of time spent on the program. Kozue was next; we arranged to meet on the 21st, during which time she will give me some advice for getting a camera mounted on TJ Bike! I've really enjoyed having lots of lessons with her over my year at Gaba. Last was Ruri, who's ruri cute and has a pretty high level grasp of grammar. We worked on reported questions. She could do everything quite well, but had a bit of trouble when the questions were present perfect and had to be reported as past perfect. have --> had. She asked me how it felt to be finished with Gaba. I knew at that moment I was reallly glad I had gotten rid of whoever it was who had been put into my last lesson but hadn't chosen me. Ruri had chosen my lesson and I felt appreciated by her. Awesome. I told her I felt a bit sad, but also excited to begin a new phase of my life. Gave her my email address, after making her report the conversation:
perfect numbers 12:56am JST Wednesday 16 March 2005 According to _Fermat's Last Theorem_, according to Pythagoras and his Brotherhood, if the divisors of a number (not including itself) add together to equal the number, it is a perfect number. According to _Fermat's Last Theorem_, no one knows how many perfect numbers there are. No one knows if they are all even. The 30 or so found so far are all even. Here is a little crappy bit of code I tossed together to search for perfect numbers. #!/usr/bin/perl foreach $P (1..9992800) { undef $sum; undef @Pstack; $halfP = int($P / 2); # don't try to divide evenly by numbers bigger than half the size of the number. foreach $a (1..$halfP) { push @Pstack, $a unless ($P % $a); # if $P modulus $a has no remainder, throw $a on P's stack of divisors } foreach (@Pstack) { $sum += $_; # add up the prime divisors of $P } if ($sum == $P) { # These are Perfect numbers printf ("%8d: ", $P); $list = join(", ", @Pstack); print $list; print " = $sum\n"; } } I ran the code above and got 6, 28, 496, and 8128. _Fermat's Last Theorem_ gave the next two, so I tweaked the first line of the code: foreach $P (6,28,496,8128,33550336,8589869056) 6: 1, 2, 3 = 6 28: 1, 2, 4, 7, 14 = 28 496: 1, 2, 4, 8, 16, 31, 62, 124, 248 = 496 8128: 1, 2, 4, 8, 16, 32, 64, 127, 254, 508, 1016, 2032, 4064 = 8128 33550336: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8191, 16382, 32764, 65528, 131056, 262112, 524224, 1048448, 2096896, 4193792, 8387584, 16775168 = 33550336 Range iterator outside integer range at ./crap.pl line 9.permalink prev day next day |