The READIN Family Album
Me and Sylvia at the Memorial (April 2009)

READIN

Jeremy's journal

We all know where we were born, o my brothers, but not where our bones will lie buried.

el Cristo de Elqui


(This is a page from my archives)
Front page
More recent posts
Older posts

Archives index
Subscribe to RSS

This page renders best in Firefox (or Safari, or Chrome)

Wednesday, January 18th, 2006

🦋 First fiddle lesson

I have been playing my fiddle increasingly often over the past year, hardly playing guitar at all any more. Today I am going to take my first ever lesson in traditional fiddle playing from Kenny Kosek. Looking forward to it.

posted afternoon of January 18th, 2006: Respond
➳ More posts about Fiddling

Monday, January 16th, 2006

🦋 Animal Anecdotes

Going to the zoo in January has two downsides: it is very cold, and many of the animals, the ones which are used to warm climates, are not out where you can see them. Upsides: there are few people there, so you've got the place pretty much to yourself; the animals which are used to cold climates include some that are fun to watch; and there are indoor displays like the reptile house, where you can warm up between walking around outside.

We took Sylvia and her friend Sasha to the Bronx Zoo this afternoon and had a great time. For me, primates are the name of the game at zoos, the animals I can spend the longest interested time just watching. And the Bronx Zoo has some great primates. We had been walking around for about half an hour and seen some nice stuff -- bison, tigers, snow leopards, red pandas, the many nocturnal species in the House of Darkness... when we got to the Congo Rainforest exhibit. No animals were out in the outdoor part of the exhibit of course; but the indoor part is one of the best zoo displays I have ever seen.

First we saw the guenons, small orange monkeys -- one of them spent about half a minute sticking his tongue out at me and Sasha -- then moved on to the living room of the gorillas. The largest female gorilla was sleeping right next to the glass partition, holding her newborn son in her arms. (I think I got a good photo of the two of them.) Behind her, another female was sleeping; after a minute or two a male came over and tapped her on the shoulder. She started up and glared at him but he made nice and cuddled behind her, laid his head on her shoulder, closed his eyes and grinned. She lay there for a minute or two, eyes open, with an irritated expression, then jumped up, picked up the pillow of straw she had been resting on, carried it over a little ways and went back to sleep. The rejected male followed after a minute or two and sat right next to her, carefully not touching her. Sylvia and Sasha sat next to the glass for easily fifteen minutes, narrating everything the apes were doing.

More simian fun at the Monkey House, where the largest enclosure is home to about 15 capuchins. Sylvia and Sasha spent another ten minutes or so watching these extremely high-energy monkeys jumping around and playing with each other. Their favorite playthings seem to be empty containers.

posted evening of January 16th, 2006: Respond

Sunday, January 15th, 2006

🦋 Sums of squares

I refined that program from Friday night a bit, to make it a little more readable and to make it calculate numbers that can be expressed as the sum of two squares in more than three different ways. The code is:

 #include <stdio.h>
#include <stdlib.h>
#include <string.h>

bool exclude(int n, int *x)
{
while (*x)
{
if (n == *x)
return true;
++x;
}
return false;
}

bool IsSumOfSq(int s, int &a, int &b, int *x)
{
for (int i = a + 1; i < s; ++i)
{
int sq = i * i;
if (s < sq)
return false;
int diff = s - sq;
for (int j = 1; j < diff; ++j)
if (exclude(j, x))
continue;
else if (j * j == diff)
{
a = i;
b = j;
return true;
}
}
return false;
}

int main(int argc, char **argv)
{
int reps = atoi(argv[1]);
int i;
for (i = 1; i < 4000000; ++i)
{
int x[10];
memset((char *) x, 0, sizeof (x));
int pairs[10][2];
pairs[0][0] = 0;
if (!IsSumOfSq(i, pairs[0][0], pairs[0][1], x))
continue;
bool match = true;
for (int j = 1; j < reps; ++j)
{
pairs[j][0] = pairs[j - 1][0];
x[j - 1] = pairs[j - 1][0];
if (!IsSumOfSq(i, pairs[j][0], pairs[j][1], x))
{
match = false;
break;
}
}
if (match)
{
printf("%d", i);
for (int j = 0; j < reps; ++j)
printf(" = %d^2 + %d^2\n", pairs[j][0], pairs[j][1]);
}
}
return 0;
}

Results: the smallest number that can be expressed as a sum of squares in three different ways is still 325. Four different ways, 1,105. Five different ways, 5,525. Six different ways (this result I find really cool), 5,525. Seven different ways, 27,625. Then I got bored and stopped checking. Note that this program could easily be optimized, it's pretty slow as presented.

Update: Wowie zowie! 27,625 is also the smallest number which can be expressed as a sum of two squares in eight different ways! This seems awesome to me though I'm not sure what to make of it.

Update: Frederick points out that 1,105 = 5 * 13 * 17; 5,525 = 5 * 1,105; 27,625 = 5 * 5,525. No idea what's going on here but it sure looks like something. I have confirmed that 138,125 (5 * 27,625) can be expressed as the sum of two squares in ten different ways; 690,625 (5 * 138,125) can be expressed as the sum of two squares in twelve different ways; and 3,453,125 (5 * 690,625) can be expressed as the sum of two squares in fourteen different ways! I do not however know if those numbers are the smallest number that can be expressed as such. (Further update: The Online Encyclopædia of Integer Sequences has some interesting stuff on this.)

posted afternoon of January 15th, 2006: Respond

🦋 The big hill all to ourselves

It snowed last night -- there is not a lot on the ground but Ellen thought Sylvia and I should take the opportunity to head down to the park and go sledding. I was a little skeptical, whether there would be enough snow to bear the sled; but we set off. A good thing right off the bat -- I had forgotten that we got Sylvia a new sled last year, a very lightweight orange thing to replace the ponderous red sled we had two years ago. The red one would not have stood a chance; this one floated along under Sylvia.

Good thing two -- when we got to the park there was a lot of ice in the grass under the snow. As it turned out the lightweight sled could move quite a distance on that thin layer of snow and ice. Sylvia was hesitant but once she took the leap, she was loving it. And no-one else had come out to go sledding -- I guess it did not seem worth-while with so little snow; so we had the big hill all to ourselves. This afternoon we will go ice-skating.

posted morning of January 15th, 2006: Respond
➳ More posts about Sylvia

Friday, January 13th, 2006

🦋 Sum of 2 different squares, 3 different ways

Over at Unfogged, Frederick suggests that 325 is the smallest number which can be expressed as a sum of two perfect squares three different ways. I just wrote a program to check this which confirms Frederick's suspicion; here it is if you want to check my logic.

 #include 
 
 int perfect[] = {
     1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 
     11 * 11, 12 * 12, 13 * 13,
     14 * 14, 15 * 15, 16 * 16, 17 * 17, 
     18 * 18, 19 * 19, 20 * 20
     };
 
 bool IsSumOfSq(int s, int &a, int &b, int x1, int x2)
 {
     for (int i = a + 1; i < 20; ++i)
     {
         if (s < perfect[i])
             return false;
         int diff = s - perfect[i];
         for (int j = 0; j < 20; ++j)
             if (j == x1 || j == x2)
                 continue;
             else if (perfect[j] == diff)
             {
                 a = i;
                 b = j;
                 return true;
             }
     }
 }
 
 int main()
 {
     int i;
     for (i = 0; i < 400; ++i)
     {
         int a = -1, b;
         if (IsSumOfSq(i, a, b, -1, -1))
         {
             int c = a, d;
             if (IsSumOfSq(i, c, d, a, -1))
             {
                 int e = c, f;
                 if (IsSumOfSq(i, e, f, a, c))
                 {
                     printf("%d = %d^2 + %d^2\n"
                           "    = %d^2 + %d^2\n"
                           "    = %d^2 + %d^2", 
                         i, a + 1, b + 1, c + 1, 
                         d + 1, e + 1, f + 1);
                     break;
                 }
             }
         }
     }
     return 0;
 }
 

Output:

325 = 1^2 + 18^2
    = 6^2 + 17^2
    = 10^2 + 15^2

posted evening of January 13th, 2006: Respond
➳ More posts about Programming

Wednesday, January 11th, 2006

At the beginning of Voyage of the Dawn Treader, the narrator introduces Lucy and says that she had already gotten to visit her magical country twice (referring to The Lion, the Witch, and the Wardrobe and Prince Caspian). Sylvia thinks about this for a while and points out that it was actually three times, referring to the three separate visits in The Lion, the Witch, and the Wardrobe.

posted evening of January 11th, 2006: Respond
➳ More posts about The Chronicles of Narnia

My Proulx jag continues: last night I finished Postcards (loved it), this morning I started The Accordion Crimes -- I was thinking after Postcards almost anything would have to be a letdown, but it looks like I was wrong based on the beginning of The Accordion Crimes. Update: Er, just now I looked at the book and noticed the title is actually Accordion Crimes.

posted evening of January 11th, 2006: Respond
➳ More posts about Postcards

Monday, January 9th, 2006

Something else about Annie Proulx -- it is amazing to me the way time passes in her stories. I am 3/4 of the way through Postcards and the story has spanned about 30 or 40 years so far; but I have no sense that I have missed parts of the story skipped over, or that I have been rushed along. Instead I feel like I have been listening to the story for 30 or 40 years. (Which is not to say the story is dragging -- it's not, it's gripping -- it seems to me like a huge accomplishment for her to be able to hold my attention for virtual decades.)

posted afternoon of January 9th, 2006: Respond
➳ More posts about Annie Proulx

Saturday, January 7th, 2006

We went ice-skating again today -- Sylvia now a little more hip to the idea that she does not know how to do it, so more resistant to learning. But after sitting on the sidelines for about half an hour, she had a change of heart and tried it out. With Ellen in hand she made it around the rink (next to the wall, usually holding it) 3 times!

posted evening of January 7th, 2006: Respond

Tuesday, January third, 2006

Today I started reading another Annie Proulx book, Postcards -- this one is grabbing me right away, pulling me into the story. I'm really liking the way she leaves key bits of the story for you to fill in -- something I have found annoying elsewhere.

Something I have been thinking ever since reading Bad Dirt -- Proulx is incredibly versatile! In each story and each book, there is a new stylistic attribute.

posted evening of January third, 2006: Respond
➳ More posts about Readings

Previous posts
Archives

Drop me a line! or, sign my Guestbook.
    •
Check out Ellen's writing at Patch.com.

Where to go from here...

Friends and Family
Programming
Texts
Music
Woodworking
Comix
Blogs
South Orange