The READIN Family Album
Happy together (Sept. 8, 2001)

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
Most recent posts about Projects

Archives index
Subscribe to RSS

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

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

Saturday, July 23rd, 2005

🦋 Idea for an opening

Walking down E. 3rd Street, Frank Valner was working on his forgetting exercises. The project he had been working on that day was the first thing to go, requiring practically no effort to banish from his mind; as his concentration deepened and his thoughts started to flow more smoothly, his palm lost the accustomed feeling of his mouse rubbing against it; his computer and then his desk melted into a sort of white noise. The sharp corners of his office were losing their definition, and his co-workers' faces becoming less distinct; when Meredith called to him from across the street and broke into his reverie.

Inspired by the last beginning in If on a winter's night a traveller, "What story down there awaits its end?"

Some more:

Frank looked up and waved, and waited on the stream of traffic to cross the street. Shaking hands he felt a drop of rain on his wrist -- "Looks like this nasty weather is going to break," he ventured.

Meredith asked whether he had eaten yet, and they started toward Avenue B, hoping to beat the storm.

Notes on setting -- Meredith has just finished gardening at the Brisas del Caribe community garden. I think she and Frank both live in an apartment building on that block. Frank had been walking east but is now doubling back. They are going to eat at Max's, on Ave. B across from Blackout Books.

Eyes wide, Frank was taking in the details of the scene -- Meredith's brown hair flecked with grey, a smudge of dirt on her temple; the rain water washing down the large front window layered itself over the partially forgotten bulletin board in the hall outside his office. While they waited for their order, Meredith was trying to engage him.

-- And Frank was trying too, to answer her -- just stop thinking so hard, he told himself, as he focused in on an interesting crack in the plaster behind Meredith's shoulder. Wrenching himself away he asked about how her garden plot was coming along.

"Really well thanks -- did you see just now, how big the cucumbers are getting?" She was really getting a kick out of growing her own vegetables -- had looked dreamily in at the community garden all last summer and been delighted when a space opened up.

A note on what I'm trying to get across, an example that just came up -- I am confronted at work right now by an insoluble bug, a crash that occurs under one specific set of circumstances on a particular machine, but does not occur (a) under seemingly quite similar circumstances on that machine or (b) under the same circumstances on a different machine. Sez I, "Sometimes the best way to solve a bug like this is to stop thinking about it for a while [and hope it goes away, sotto voce]." And start working on a known, soluble bug in an unrelated program.

Frank had noticed the cucumbers, lovely dark green bumpy things, and they talk about that for a bit -- Meredith is thinking the harvest will be soon and would love for Frank and a few others to come over to a home-grown dinner. Frank is nervous and sweating a bit -- well, put that down to the humidity, which the air-conditioning at Max's does little to mitigate -- and is happy to see the waitress approach with plates of noodles.

posted evening of July 23rd, 2005: Respond
➳ More posts about Writing Projects

Monday, July 11th, 2005

🦋 Summer projects

A status update on my still-outstanding home improvement tasks for the summer.

Woodworking

  • Ellen painted Sylvia's playhouse to match the garage which it is next to, and it looks very nice. It's gotten a good deal of use from Sylvia and various friends this summer, as I was hoping it would.
  • The garbage-can enclosure is up. I finished installing it last weekend, and had the inspiration (born of laziness) to make a raised garden with the dirt I had excavated, instead of carting it away. I finished that this weekend, using some rocks from Eva's property (where we visited Saturday) to complete the retaining wall. Under the dirt where I excavated is an old slate patio in very bad condition; Ellen had the inspired idea to use the fragments of slate to create a walkway leading to the front garden.
  • However, I still have to build the gates for the enclosure. Once I build and hang these, Ellen will be able to paint the structure.
  • We cleaned up the garage and actually have a decent work area there now. Janis had given me some old trestles for a work table, which I nailed together with maple planks, and built a shelf above it.
  • I have an idea that I may actually get to building the small tool shed sometime in August.

Patio

  • The slate walkway along the driveway is level and drains well, which has made me realize that the driveway itself is not level, and drains poorly. Aargh...
  • I ended up underlaying the garbage can enclosure with limestone instead of bluestone, because it was available in a more convenient shape. Damned expensive though!
  • I'm planning to do the extension of the back patio next Friday, when i am taking the day off. If this goes according to plan, then I will start drawing up plans for the tool shed next weekend.

posted afternoon of July 11th, 2005: Respond
➳ More posts about Sylvia's room

Friday, June 10th, 2005

With regards to my most recent post -- The idea of writing poetry directed at a listener (who let's say for the sake of argument is me), asking him to consider a situation where he is talking to or watching somebody else and to try to imagine how he would react, or to suggest a possible reaction, seems pretty interesting to me, and like it might be a useful format to spend some time working on. Are there any good poets that use this format, that I could read up on?

posted afternoon of June 10th, 2005: Respond
➳ More posts about Poetry

Wednesday, June 8th, 2005

🦋 Poetry blogging

Here is something I have never done: I am posting a poem which I wrote this afternoon.

Facets

So what about Jason,
Who throws up his hands in disgust
And cries, "I've been living a lie!"
As he flounces out of the room
To reclaim his truer self --
What are you his interlocutor
To make of this behavior?
Sit puzzled in his wake, pulling at your beard, mulling,
Muse: "Hmm, 'living a lie', I like the sound of that..."
Find a facet of your being in Bad Faith,
Some distorting mirror,
Imagine it cracked.

posted evening of June 8th, 2005: Respond

Tuesday, May 31st, 2005

🦋 Lotsa Pictures

A bunch of new images for the READIN Family Album:

posted evening of May 31st, 2005: Respond
➳ More posts about Sylvia

Thursday, May 26th, 2005

🦋 Project pix

Got my scanner working!

posted morning of May 26th, 2005: Respond
➳ More posts about Home improvement

Sunday, May 22nd, 2005

🦋 Summer projects

A status update on my home improvement tasks for the summer.

Woodworking

  • Sylvia's room is painted and lovely; I would post a picture of it if I could figure out how to make my scanner work again. (Update: Scanner working; here's the picture.)
  • I finished building Sylvia's playhouse on Friday. Still needs to be sanded and weather-proofed.
  • The garbage-can enclosure is pretty well-thought-out now and may commence actually getting built over Labor-day weekend. (Although the priority project for that weekend is cleaning the garage.)
  • The small tool shed is still a thing of fantasy.

Patio

  • Today I started raising the slate walkway up to driveway level, and got about 3/4 of the first section done, before the rains came. The work is going pretty quickly and coming out well.
  • Next weekend, when I may-or-may-not start building the garbage enclosure, I also may-or-may-not start laying stone in the area where it is to go. I think I don't have enough bluestone to do this and would like to figure out if there's somewhere I can buy 20 or so square feet without having to buy a full pallette.
  • If I might not have enough stone for the garbage enclosure base, I certainly don't have enough to extend the back patio. So that's on hold for now.

posted evening of May 22nd, 2005: Respond
➳ More posts about Patio

Monday, May 16th, 2005

🦋 Playhouse progress

A lot more work yesterday on Sylvia's playhouse -- I shingled the roof (in a kind of half-assed way which involves nail heads being visible at the top of the roof) and put up the railing along the sides and back. Today I am quite sore.

Next step is to put a railing on the front (only halfway across the front) and a ladder. It seems totally possible to me that the house will be finished by next weekend in time for my birthday party.

posted morning of May 16th, 2005: Respond
➳ More posts about Sylvia's playhouse

Friday, May 13th, 2005

🦋 Roof-raising

Frank and I got roof up on Sylvia's playhouse last night -- it looks good and all that is needed now is a ladder and a railing.

posted evening of May 13th, 2005: Respond

Previous posts about Projects
Archives

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

Where to go from here...

Texts
Programming
Woodworking
Music
South Orange
Friends and Family
Blogs
Comix