Sunday, March 18, 2018

Directed Writing

I don't remember the prompt for the first one, but here's what I wrote:

The headlights slowed as they approached, and I took a last drag before flicking the butt into the night.

I stepped onto the cab's ladder to reach the door handle and swung my knapsack onto the floor. “Howdy, and thanks—” I said as I shut the door.

The first surprise was her voice. “Evenin’, stranger,” she said as she steered the 18-wheeler back onto the highway.

Immediately I sat up straighter. “Thanks for stopping, ma’am.”

That got me a guffaw. “Don’t call me ma’am—I work for a living!”

“You navy?” I tried.

“Marines!” she said. “Made sergeant but two tours was enough.”

“Thanks for the lift, Sarge,” I said.

“Where you headed?”

“Anywhere but here. Did some stupid things here. Lost my company, family, house. All I got left is my bones.

“You got a passport?” Sarge glanced at me doubtfully.

“Turns out I do,“ I said. “Needed it for business travel. Not any more, though.”

“Well, sailor,” she said. “This load’s headed for Manitoba. Can you navigate? On land I mean.”

“Sure, Sarge. I was an ensign


I ran out of time there. Here's the next one, addressed to my late father.
It was just the other day I felt the rail scraping the top of my head. I might have let out a yelp. It amused you that I had grown too tall to walk carelessly under that old kitchen table.

Where were we living then, Dad? Was it the year JFK was elected? Were we in Manoa then? I remember the curved tubular steel legs and the leaf in the middle— I don't think I ever saw the table without it.

But I don't recall which way it faced, or whether the girls were born yet.

Nothing profound, just a snapshot—discovering that my head reached the rail, seeing your smile and hearing your chuckle just the other day, not quite 60 years ago.

Sunday, January 07, 2018

Who are you?

A few days ago, in this prayer guide from https://pray-as-you-go.org, the following paragraph appeared:
Just one question to think about today, a question asked in this passage: “Who are you?” – not as easy a question to answer as it might seem. Imagine that you have been asked that question; what words would you find to answer? “Who are you?”
The passage was from John 1, where priests and Levites quizzed John the baptizer.

With a decade at most before retirement, I’m finding the question a lot more interesting. A passage from Wendy M. Wright’s Exploring Spiritual Guidance (Nashville, TN: Upper Room, 2006; ISBN 0-8358-9834-2) came to mind. It doesn't explicitly ask that question, but shows some of the wrong ways I sometimes answer it:

A career woman I know once spent a month at a L’Arche community farm. L’Arche is an organization that brings together persons with mental challenges and persons without such challenges into a shared life experience. This woman went with the idea of helping others, fulfilling her Christian duty by using her gifts on behalf of less fortunate persons. Her experience was exactly the reverse. A city girl, she found herself quite helpless on a farm. She had to be constantly tutored in the most gentle and compassionate way by those she had imagined she would serve. As this woman gradually came to accept her dependence on others, she became aware of all the subtle ways she had learned over the years to mask her neediness. Always having to look good was one way. Always having the right answer was another. Always being competent was a third. She came to see that the tables had turned. The very persons she came to help were helping her. They were her spiritual mentors in the way of God’s love and the dignity of each human life. (56)
Paraphrasing, three wrong answers to “Who am I?” are:
  • The one who always looks good (I take this to mean reputation rather than beauty because, well…)
  • The one with the right answer
  • The competent one

Now there’s nothing wrong (I hope!) with wanting to look good, or wanting to have the right answer (rather than wrong ones), or wanting to be competent (rather than…?). Reputation, knowledge and competence are good servants but they make poor masters. If we find ourselves in a place where reputation is useless (as Nouwen did at L’Arche), where questions have no real answers, where there is no human competence—what do we do then?

I had lunch lately with an old friend, a very smart guy, a former professor and consultant. We worked together on and off from the ’80s into the early 2000s. A while ago, the executives who knew him all retired, and he's left without (as he put it) “interesting problems to solve.” I look at him and see my future.

Well, part of it, anyway. The part about no interesting problems to solve, that’s not a happy prospect. It’s not just the lack of problems, but the lack of people who are interested in whether I solve them. Am I interested in getting approval and appreciation? Of course I am! But almost as much, I’m interested in doing something for people, helping them make progress on their goals.

This is one way I know I was never cut out for the monastic life. Regarding that life, Merton wrote in No Man Is an Island:

The human affections do not receive much of their normal gratification in a life of silence and solitude. The almost total lack of self-expression, the frequent inability to “do things for” other people in a visible and tangible way can sometimes be a torture and lead to great frustration. That is why the purely contemplative vocation is not for the immature. One has to be very strong and very solid to live in solitude.
8§18 (p. 155, 2003 B&N edition)
As much of an introvert as I am, I’ll tell you right now I'm not “very strong and very solid” in that way.

Back to the original question, “Who are you?”—the answer, “I’m a software engineer at N--- Inc.” isn’t factually false, but neither is it the right answer. “I’m a husband and father” is more meaningful and enduring, as it’s not contingent on my current employment situation.

As you can see, I struggle a bit with the answer. A Christian-ly correct answer might be, I’m an adopted child of my heavenly father. Now this one is true but also meaningless to a lot of people I know. What does that mean to anyone unfamiliar with the jargon, and what comfort does it bring to me? I mean, God loves me, but (as Judd Hirsch's character says in Ordinary People) “he likes everybody—he’s got no taste.”

The answer I want to be the most true is: I’m a man who’s becoming more compassionate, peaceful, patient, kind, courageous, generous—a man who, when people talk with me, they feel empowered and liked and encouraged and strengthened. Whoa, it just hit me, I mean just at this moment as I type—I know what I want. I want this verse from Isaiah 58 to be true of me:

And your ancient ruins shall be rebuilt;
    you shall raise up the foundations of many generations;
you shall be called the repairer of the breach,
    the restorer of streets to dwell in.
Isaiah 58:12 RSV

Sunday, December 17, 2017

Life imitates code

Sometimes life imitates art, as they say; this is a case where life imitates code.

It started a half-century ago at least (the story, not the code). Way back when I was in elementary school, Dad gave me the idea of making “Soma cube”s out of wood. I don’t know how many of these I made back in grade school, but a few years ago I started doing it again.

Then about this time last year, I wondered what it would be like to write a program to solve the puzzle. This page has links to the source code for a solver written in C++; I couldn’t run it because I don’t do Windows. I soon decided to keep the data representation but otherwise write a new solver in Python.

The solver places the “T” piece in the only way possible (as explained here in the wikipedia article), then places the “L” piece in one of 28 unique positions. Here “unique” means never having to say “that’s a reflection of a previously-described solution”; ask me for details or see the code if you’re hungry for details. Anyway, the other pieces—V, Z, A, B, P (wikipedia’s nomenclature)— get placed after T and L.

Consulting a recent output, I discovered that the “V” has 103 possible placements (by “possible” I mean given the position of “T”), whereas the “P” has only 42. For some reason I had the intuition that placing the “P” first would use less CPU time.

I ended up coding a sort step so that the solver would place the “hardest” piece (the “P”) first, and then the pieces with increasing numbers of possible placements, and finally the “V” last. How much of a difference does it make? I don’t recall, but I’ll just try it now on a 2.4GHz Intel Q6600:

$ time ./soma2-unsorted.py > s2-unsorted.out

real 3m46.587s
user 3m46.564s
sys 0m0.004s
$ time ./soma2.py > s2-sorted.out

real 0m38.732s
user 0m38.720s
sys 0m0.008s
$ 
That’s 226.6 seconds vs. 38.7 seconds, a nontrivial difference.

Fast-forward to earlier this month. I was thinking again about wooden puzzles and wikipedia told me about the “diabolical cube”, with only 13 solutions, and it’s here that life imitates code.

Because of my experience with the Soma cube solver, I immediately started by placing the “hard”est-to-place pieces first, and then try to place the easier ones. By proceeding that way, I figured out the first several solutions. But to get the rest of them, I modified the Soma cube solver… after a few tries it worked, completing in about a second. Here’s an actual run on the same box as above:

$ time ./diacube.py  > d.out

real 0m0.978s
user 0m0.976s
sys 0m0.000s
$
The 7-cube piece must be placed parallel to a face of the desired 3x3 cube; it can be
  • actually on a face—in this case, the rest of the pieces determine a unique solution; or
  • between two faces—in this case, it’s possible to create solutions that are reflections of each other. I could have avoided this by coding for placement of the second piece (I would have done this to the 6-cube piece) but instead opted to write a little code to keep only one solution out of a pair of reflections.
There wouldn’t be many of these, because my program produced 17 solutions, whereas Wikipedia told me there were only 13. So it computed only 4 redundant solutions, and it would take longer to think about unique placements than it would be to write the code to find reflections.

Or so I thought. I goofed up the code that looked for reflections, because I had forgotten that my solutions contained references to each polycube’s placement. In computing a reflection, I trashed the original polycube. A rookie error.

Anyway, if you ever get your hands on a “Diabolical cube,” it’ll be a lot easier to solve if you place the 7-cube piece and the 6-cube piece and the 5-cube piece first.

For reference, I’ll give you the 13 solutions, after some blank space if you want to avoid the spoiler :)

solution 1:
6 6 6
4 4 2
4 4 2
7 6 6
7 7 7
7 7 7
3 3 6
5 3 5
5 5 5
solution 2:
6 6 6
4 4 2
4 4 2
7 6 6
7 7 7
7 7 7
5 5 6
5 3 3
5 5 3
solution 3:
6 6 6
2 4 4
2 4 4
7 6 6
7 7 7
7 7 7
3 3 6
5 3 5
5 5 5
solution 4:
6 6 6
2 4 4
2 4 4
7 6 6
7 7 7
7 7 7
5 5 6
5 3 3
5 5 3
solution 5:
6 5 5
6 6 3
6 6 6
4 4 5
4 4 3
2 2 3
7 5 5
7 7 7
7 7 7
solution 6:
6 5 5
6 6 3
6 6 6
2 2 5
4 4 3
4 4 3
7 5 5
7 7 7
7 7 7
solution 7:
4 6 2
4 6 2
5 6 5
4 6 3
4 6 3
5 5 5
7 6 3
7 7 7
7 7 7
solution 8:
4 6 3
4 6 3
5 6 5
4 6 2
4 6 3
5 5 5
7 6 2
7 7 7
7 7 7
solution 9:
4 5 5
4 3 2
3 3 2
4 5 6
4 6 6
6 6 6
7 5 5
7 7 7
7 7 7
solution 10:
4 5 5
4 3 3
2 2 3
4 5 6
4 6 6
6 6 6
7 5 5
7 7 7
7 7 7
solution 11:
3 5 5
4 4 2
4 4 2
3 5 6
3 6 6
6 6 6
7 5 5
7 7 7
7 7 7
solution 12:
2 5 5
3 4 4
3 4 4
2 5 6
3 6 6
6 6 6
7 5 5
7 7 7
7 7 7
solution 13:
3 5 5
2 4 4
2 4 4
3 5 6
3 6 6
6 6 6
7 5 5
7 7 7
7 7 7

Sunday, December 10, 2017

A few thoughts from when my home was invaded by adolescents

That was a long time ago, but I'm thinking now about a couple of specific things we heard at the girls’ school in those days.

One was a seminar titled something like “When an Adolescent Invades Your Home”—I mentioned it in this post (written when both girls were in college). The presenter said that for quite a few years, children live largely unconsciously, with the lights off (he turned off the classroom lights to illustrate). Then, he said, a wonderful thing starts to happen: the lights come on (he flipped the switch to on) for a while (he turned the lights off). He didn't play with the switch much longer, but we got the idea.

This rang true, as I remembered doing really stupid things when I was younger, and yes I do feel very fortunate to be alive. Even today, the lights aren’t on for me all the time… but enough about me :). The point, though, is that for junior high kids (and even high school kids), the lights aren’t always on.

Another thing from that seminar iirc is that the onset of puberty has been happening earlier and earlier in the United States. One guess is that it's related to the hormones we feed to livestock to get them to mature faster. Anyway, the lights aren’t coming on necessarily sooner, but the hormones are raging earlier. So it’s more challenging now than it was a half-century ago.

The other thing that stuck in my mind was something their junior-high school Principal said in a graduation speech (probably in 2005). As parents, we have many roles with our kids. We supervise, guide, teach them, coach them, and so on. But what stuck in my mind was his comment that from here on out it’s mostly cheerleading; by now their habits are largely already set. From here on out (this was 8th grade graduation), we are not going to change their minds about many things, or get them to develop or drop many habits.

In other words, the time for most (key word, that: most) of that has already passed. Which is actually kind of scary, considering that the lights are still off a fair amount of the time and that their hormones are probably raging more than ours were at their age.

But then nobody said it would be easy.

Sunday, November 19, 2017

What should the church think about nontraditional sexuality?

(title updated 2017-12-10)
Some years ago, when I was recruiting the next cohort of elders to be on our church’s board, I spoke with a sister I’ll call “Dorcas,” whom I thought eminently qualified. She declined, citing Tim Keller’s teaching that women are forbidden from the office of elder. I was quite surprised at Dorcas’s demurral, but wondered whether my ideas were more enlightened than hers, or just less pure.

Though I hate to disagree with Dr. Keller, I nevertheless undertook my own study of the issue, consulting other writers as well as the Scriptures. You can see the results here on my blog.

Fast forward to about a year ago, when my younger daughter Sheri asked me to consider a study regarding the Bible’s teaching about homosexuality. Was the traditional interpretation in fact correct, and is the 21st-century Church drifting away from the truth? Alternately, have we been wrong all this time, as we were about slavery for example, and are we due for a change?

Before going into my study and its results, I’ll summarize my understanding of the issue when I started out. A few points, in no particular order:

  • In the beginning, God created humans male and female, as the Lord Jesus said in Matthew 19.
  • The Law (the first 5 books of what Christians today call the “Old Testament”) forbids various kinds of sexual activity; I blogged about one such prohibition back in 2007, when the One Year Bible’s daily reading included Leviticus 18.
  • Although Jesus affirmed some parts of the Law (Matthew 5:17ff), he revised other parts (Mark 7:5–7, 17–23). Hence it’s debatable whether the Old Testament’s gender-related prohibitions were confirmed vs. revised by Jesus. From my limited understanding it appeared to me that Jesus didn’t revise or amend any of those gender-related prohibitions.
  • The above notwithstanding, Jesus never directly addressed gender identity nor sexual activity (or attraction) between persons of the same gender.
  • It bears repeating here that Jesus did directly address sexual sins such as adultery, which he defined very broadly (Matthew 5:28); anger; covetousness; failure to care for the hungry, the alien, the prisoner, the sick. These sins are practiced very widely, even within the church—to our collective shame.
  • I remember a conversation I had at that time with a fellow elder on my church’s board. Based on my understanding of the Scriptures, I asserted that God would never punish sexual activity by eternity in hell. My fellow elder’s reply was something like: “I’m more concerned with how we treat them here on earth.”

    I’m glad that we were in agreement regarding ultimate destiny, but his comment influenced me in the intervening years in the way I think about the Christian life. Jesus did speak of the world to come, but he spoke a lot more about life here and now.

Also, around that time, I read
  • Jesus, the Bible, and Homosexuality by Jack Rogers;
  • Wesley Hill’s Washed and Waiting; and, some time later,
  • Justin Lee’s Torn.
The Rogers book I found wholly unconvincing at the time. I’m unsure what I’d think of it today.

Hill and Lee are gay men who have struggled with their orientation for many years. These brothers of mine desire to follow and obey and worship and serve God. They did not ask for their same-sex attraction; indeed, they sought to change their orientation. One passage in Washed and Waiting particularly touched me when I read it in 2011. Hill attended a wedding reception and got bulldozed into dancing with a young woman he knew slightly in college.

A couple of days later I explained to my friend Chris over breakfast what had happened. We danced, I said. I was with this beautiful girl. I was holding her hand and touching her back. Her dress was thin and showed every curve on her body, I said. I could feel her sweating through the dress, and, inches from her face, I could see every exquisite feature she had. “And, Chris,” I said, “I felt nothing. No attraction. No awakening or arousal of any kind. No sexual desire whatsoever.”

Chris nodded. He knows my situation backward and forward and wasn't fazed by what I was telling him.

“The worst of it,” I continued, “is that while I wasn’t attracted to this stunningly beautiful person who was my dance partner, I couldn’t stop looking at the guy dancing several feet away from me. I did notice him. I noticed his body, his moves. Chris,” I said, “I was attracted to this guy. All I could see and desire was another guy across the room while I’m dancing with this girl. This is so frustrating. This is what it means to be gay, and I would give anything to change it!” (133)

Poignant and painful, these paragraphs gave me a little bit of a picture of what it’s like to have only same-sex attraction. As I paged through the book, searching for this passage, I confirmed my impression that Hill’s view is the traditional one.

I read Lee’s book a year or two later, shortly after it came out late in 2012. As Hill gave me an idea what it’s like to have same-sex attraction, Torn gave me a picture of what it’s like to be in the Church as a gay man. As one might expect, it’s a mixed bag. Lee has some prescriptions for us all, whether or not we take the traditional view on same-sex attraction. I think these steps would be very helpful, and I hope this little essay is a baby step forward.

One thing from Lee’s book that shocked and saddened me was his discovery that so-called “reparative therapy” has never actually worked—as far as his investigation was able to find. He quizzed people about successful case studies, but none seemed to exist. In other words, the whole thing was wishful thinking at first and a fraud later on. Whether you believe Lee, or some of the claims in Exodus International’s wikipedia article, the organization no longer exists.

When Sheri prodded me to undertake my current study, she pointed me at video lectures by Gushee (I’ve lost/forgotten the links), which the lovely Carol watched with me. These presentations discussed the experience of LGBT folks in the church; I’m sorry to say that overall we have not welcomed them and we have not loved them the way Jesus would have us to do—independent of whether certain kinds of sexual attraction and activity are (or aren’t) considered OK by God. In hindsight, it was appropriate that my current study began with the more important question, viz., how are we doing on that new command Jesus gave his disciples? “A new command I give you,” Jesus said: “That you love one another even as I have loved you, that you also love one another. By this everyone will know you are my disciples, if you have love for one another” (John 13:34–35).

That said, the question “What does God think about certain behaviors?” is still important, and to that end I’ll mention a few resources that I encountered this past year:

Brownson argues persuasively that neither the traditional interpretation (basically what I thought in 2013) nor revisionist interpretations (I think of Rogers, but it’s been several years since I actually read him so I’m not sure) are correct. He ends up pretty much saying what Loader says, but his argument is more comprehensive (it’s a book to Loader’s short essay). I’ll jot down a few things that I remember from it.
  • When we protestants read the Bible, we make all kinds of judgments about what we must follow vs. what we need not follow today, following various kinds of logic. So for example, we discard the prohibitions against bacon and shrimp not only because they’re delicious, but also because Jesus declared all foods clean. The Apostle Paul also wrote a lot about this in Romans and Colossians.
  • These arguments are not just about Old vs. New Testament commands, either; Jesus commended foot-washing. The Apostle Paul forbade braided hair and golden jewelry. He also commanded that men lift their hands when praying.
  • To determine whether a particular biblical precept or prohibition is normative for today, then, we engage the text with some kind of logic or another. These we hope are coherent and consistent, and are not based solely on what feels good vs. icky to us.
  • When we examine the prohibitions against sexual activity between two people of the same gender, we must try to understand how to interpret them. Are those commands like the Old Testament prohibitions of bacon and shrimp? Or the commands prohibiting sexual intercourse during a woman’s menstrual period?

    Alternately, are they like the New Testament commands to greet one another with a holy kiss, or to abstain from braids and jewelry? Or are they in the same vein as “Do not lie to one another”?

  • Romans 1 seems to condemn same-sex sexual activity, but if that’s the common-sense interpretation of Romans 1:25–32, what’s the meaning of “you who pass judgment do the same things” (2:1)? The same things: what same things?

    Brownson explains it better than I ever could, but his point is that in order to explain the flow of the argument in 1:25 onward, the explanation must also say what 2:1–4 means. The rhetorical style seems to be that in 1:27–32, Paul takes the part of certain moralists of the day. Then in 2:1 he takes a sharp turn and shows why his readers must not just nod in smug agreement with the previous several sentences.

The short version is, Brownson convinced me, and Loader’s essay is a terrific shorter summary of part of Brownson’s argument.

But more important than a list of what specific sexual behaviors are permissible between which specific partners—about which reasonable, diligent, devoted disciples of the Lord Jesus Christ disagree—is the question of how we treat our neighbors (the subject of second greatest command, which is like the first, Jesus said in Matthew 22:38–39) and how we treat one another (John 13).

And that, as a former manager used to say, is all I know.

Saturday, October 14, 2017

An eventful week; a grateful me

The younger ex-teen got married last weekend; it was a celebration of great joy—and also relief.

You see, Grandma Bessie (my mom) was planning to visit us, arriving Tuesday night. But rather than going to the airport, she went to the emergency room due to abdominal pain, severe and unrelenting. My mobile phone exploded with text messages. The phrase “aortic <something>” was heard. X-rays and CAT scans were discussed.

They had me at “aortic”; I started checking flights, but didn’t book anything until the medical folks settled on the diagnosis: aortic aneurysm. I clicked “Book this flight” for Alaska 837, SJC→HNL Wednesday morning.

Wednesday

Am I getting old, or was it just the stress, or have the seats gotten harder? Whatever it was, I was hurting by the time we landed. Inga picked me up and we went straight to Queen’s. Dr. Sato came in and advised Mom to get the endovascular aneurysm repair, maybe like the one decribed here on webmd.

As I heard the story, Mom had said she’d consider it; today the surgeon was recommending it. He itemized a bunch of risks, things that might happen during surgery. They’re not frequent, he said, but they do happen. I asked him what he would recommend for his own mother, if she had a similar condition. Surgery.

He told Mom of a past, younger patient of his. He recommended the surgery, she declined, she went home, the aneurysm ruptured, and she died the same day. Mom was sold, and Dr. Sato indicated that he’d try to do the endovascular aneurysm repair Thursday afternoon.

Then an anaesthesiologist came in, describing how the anaesthesia itself had risks (beyond the surgery), including death! My comment was, we don’t have many alternatives here.

Thursday

In the morning we heard the surgery would be at noon! I ran down to the hospital, having spent the night at “home,” and hung around until they shooed me out. I sat in the waiting room for a while, and then sister Donna said I could join her in pre-op. After some confusion, the nurse and I found each other, and she ushered me in to Mom’s area, where it was freezing. I was impressed by the keep-warm technology.

Mom was mightily bored by all this and kept dozing off, or maybe she just closed her eyes. Eventually they said they were really going to do the surgery, and I snapped a pic just as she was about to go to the “OR.” The photo is dated 1:57pm.

I went home for a nap, and Mom was done about 5:20pm. The surgery had gone well, I heard. I eventually figured out how to get to the surgical waiting room in QE Tower. Quite a few folks were there, sister Inga and nieces and nephew; several of them were still heading to California for the wedding.

They let me into the recovery area after a while, and I joined Donna there. Mom would have to lie flat for four hours, the first two with sandbags on her thighs, to discourage reopening of the surgical incisions (pokes, actually). She wasn’t too happy about that.

I held Mom’s hand for the next 3 hours or so, giving her Bible passages or praying or chatting or just sitting. At some point Donna took my parking ticket to a nurses’ station, where they stamped it for me. I would later find out that the afternoon’s parking would be on the house :).

At the 7:00pm shift change, the new nurse asked Mom if she knew where she was.

“Hospital,” she murmured.

“Do you remember the name of the hospital?”

“Queen’s.”

“Do you know what month and year it is?”

“October,” she croaked.

“And do you know remember the year?”

“Seventeen.” It was barely a whisper.

“Who are these people?” the nurse asked, indicating Donna and me.

“I don’t know!” she said. Very funny, Mom! The nurse wasn’t fooled for a moment.

Some other post-op procedures were needed. An X-ray for example. So the X-ray guy showed up after a while and said something about sitting her up. The nurses updated him on the situation; I didn’t have to tackle him.

Around 10pm the nurse moved her to a private room in QE tower. We were about to exit the elevator on the 8th floor when an EMERGENCY indicator lit up, the doors closed, and the elevator expressed back whence we came.

The doors opened to reveal a nurse with a surprised expression; he released the elevator, mumbling something about grabbing another one, and the elevator returned to the 8th floor. Our nurse explained that some ICU patients must be transported without delay immediately after surgery; they cannot wait.

Mom got situated and after a while, Donna suggested I go home. No argument from me on that.

Friday

The next morning, Dr. Sato dropped by Mom’s room to ask how she was doing. Any pain? Mom shook her head no.

He smiled. “See? Told you!”   He also said, “You can go home today as far as I’m concerned.” No medication needed, but Mom should take it easy the next couple of weeks.

I ran “home” so Jana could take me to the airport. (I had already packed my things.)

My return flight was uneventful, but all too long. Again my seat hurt. The lovely Carol picked me up late Friday night.

Saturday

I’d missed Friday afternoon’s rehearsal, but I was assured all I had to do was follow directions—always a challenge for me, but perhaps it would be OK this time.

Several friends of Peter and Sheri spoke at the ceremony; each one added a unique perspective, so that all of us present got glimpses of both bride and groom. I have to tell you that as much as I respected and esteemed Peter before the ceremony, his friends’ comments made me feel even happier to have him in our family. The celebration was intimate and meaningful and and God-honoring.

By the way, my nephew Keith unobtrusively live-streamed the ceremony; Mom and Donna and Jana and Mom’s great-grandchildren all could see it.

As I said at the reception, “It’s hard to be humble when Peter is your son-in-law!” Oh, and we “facetime”d with Mom at the reception. She looked happy.


I am a very grateful man today. I wasn’t quite in a panic Tuesday, but as I said several times, it was a little too exciting. Aortic aneurysms are often fatal; it was fortunate indeed that Mom had a lot of pain so that she would know to go to the hospital. And it was fortunate that the symptoms appeared before she came to California.

And now both my daughters have husbands that make it impossible for me to be humble.

And it’s also really hard to be ungrateful. My cup is full, even as the nest is empty.

Monday, October 09, 2017

Well, that’s weird: Fibonacci edition

About six years ago, I read a puzzle about Fibonacci numbers in CACM and tried to understand the solution, so when I recently saw on quora the question “Is every Fibonacci number divisible by 31 also divisible by 61?” I was interested enough to figure out (to my surprise) that indeed every one is: every 15th Fibonacci number is divisible by 61, but only every 30th is divisible by 31.

This I found unusual and amazing, and I wondered, for what other primes is this true? Naturally I wrote some Python.

#!/usr/bin/python -utt
# vim:et:sw=4

'''
Let f(n) be the nth Fibonacci number (f(0)=0, f(1)=1, f(n)=f(n-1)+f(n-2))
For prime p, let ff(p) be the smallest n such that p|f(n),
e.g. ff(3)=4 because f(4)=3

Now, what primes (p, p2) satisfy p>p2 but ff(p)<ff(p2) and ff(p)|ff(p2)?
'''
import sys

def main(maxx):
    '''
    Get primes up to /maxx/, and the first /maxx/ Fibonacci numbers,
    then check for the criteria described above.
    '''
    plist = prime_list(maxx)
    flist = fib_list(maxx)
    ff = dict()
    for p in plist:
        for n, f in enumerate(flist):
            if f >= p and f % p == 0:
               ff[p] = n        # e.g. since f(4) == 3, ff[3] = 4
               break
        else:
            print "Couldn't find fib which %d divides" % (p)
    # Now ff[p] is idx of 1st fib that p divides
    for idx, p in enumerate(plist):
        f = ff[p]
        for j, p2 in enumerate(plist[:idx]):
            # for p2 < p
            f2 = ff[p2]
            if f2 > f and f2 % f == 0:
                print 'f(%d) = %d and f(%d) = %d' % (p, f, p2, f2)
            
    sys.exit(0)

def prime_list(pmax):
    '''
    Return a list of prime numbers up to pmax (sloppy criterion)
    '''
    # First two nontrivial primes
    plist = [2, 3]
    # Look for further primes by formula p = 6k +/- 1 for some k
    for cseed in range(6, pmax, 6):
        cand1, cand2 = cseed - 1, cseed + 1
        for p in plist[2:]:
            # Zero a cand if another prime p>3 divides it.
            # Need not check p≤3 because of construction.
            if cand1 == cand2:
                # must both be zero
                break
            if cand1 and cand1 % p == 0:
                cand1 = 0
            if cand2 and cand2 % p == 0:
                cand2 = 0
        else:
            append_t(plist, cand1)
            append_t(plist, cand2)
    return plist

def append_t(alist, athing):
    '''
    Helper: append /athing/ to /alist/ but only if /athing/ is "true"
    '''
    if athing:
        alist.append(athing)


def fib_list(fmax):
    '''
    Return a list of the first /fmax/ Fibonacci numbers
    '''
    bak1, cur = 0, 1            # f(0)=0, f(1)=1
    flist = [bak1, cur]
    for n in range(2, fmax):
        bak1, cur = cur, cur + bak1
        flist.append(cur)
    assert flist[5] == 5        #print 'DEBUG:', 5, flist[5]
    #print 'DEBUG:', flist
    return flist

if __name__ == '__main__':
    maxx = 99
    if len(sys.argv) > 1:
        maxx = int(sys.argv[1])
    main(maxx)
Running it produces:
Collins-MacBook-Pro:fib31 collin$ ./pfib.py 
f(61) = 15 and f(31) = 30
f(89) = 11 and f(43) = 44
Collins-MacBook-Pro:fib31 collin$ 
Whoa, really? Every 11th prime is divisible by 89, but only every 44th is divisible by 43? H'm.
f(11)=89, f(22)=17711, f(33)=3524578, f(44)=701408733
Every one of those guys is divisible by 89, but only the last is divisible by 43. How weird is that? And from looking at the pattern of what happens to f(n) mod 89 as n increases, it's clear that indeed every 11th Fibonacci number is divisible by 89, and every 44th is divisible by 43.

If instead of 99 we say 199 or 299, what do we get?

Collins-MacBook-Pro:fib31 collin$ ./pfib.py 199
f(61) = 15 and f(31) = 30
f(89) = 11 and f(43) = 44
f(199) = 22 and f(43) = 44
Collins-MacBook-Pro:fib31 collin$ 
OK, I examined that one, and everything is as it seems. What if we go another 100?
Collins-MacBook-Pro:fib31 collin$ ./pfib.py 299
f(61) = 15 and f(31) = 30
f(89) = 11 and f(43) = 44
f(199) = 22 and f(43) = 44
f(211) = 42 and f(83) = 84
f(211) = 42 and f(167) = 168
f(229) = 114 and f(227) = 228
f(233) = 13 and f(79) = 78
f(233) = 13 and f(103) = 104
f(233) = 13 and f(131) = 130
f(281) = 28 and f(83) = 84
f(281) = 28 and f(167) = 168
f(281) = 28 and f(223) = 224
Collins-MacBook-Pro:fib31 collin$ 
Well, that was fun if not exactly insightful. Why so many from 200–299, compared to the range 1–199? But the upshot is, we could ask a number of other questions, like
  • Is every Fibonacci number that's divisible by 89 or 199 also divisible by 43? (Yes.)
  • Is every Fibonacci number that's divisible by 79 or 103 or 131 also divisible by 233? (Yes.)
and so on. No idea why, but there it is.