# Adding Primes to Produce a Prime

Inspiration for this problem comes from my good friend Johnny Aceti.

Consider numbers $x,y \in \mathcal{P}$ where $\mathcal{P}$ is the set of all prime numbers $\in \mathbb{N}$.

Conjecture 1. There exist consecutive $x,y \in \mathcal{P}$ such that $x+y \in \mathcal{P}$.

Is this true? Well lets see.

Every prime except 2 is odd. Let’s first look at adding together 2 odd primes. Odd numbers are equivalent to $1 \mod 2$, and if one adds together two numbers that are $1 \mod 2$, you get a sum that is $0 \mod 2$. This means the sum is even, and since we can’t add two primes to get 2, this means that you cannot add an even number of odd primes to produce a prime. This takes out just about every possibility for this conjecture to be true, but we haven’t considered 2 yet, since before we were only working with odd primes.

Let’s try the case where we use 2 as $x$.

$2 \equiv 0 \mod 2$ and every other odd prime is $1 \mod 2$. Therefore, if we added them, we could get a sum that is $1\mod 2$. So far so good, this means our sum is odd. But is it prime? The only instance involving 2 if $x, y$ have to be consecutive is $2+3=5$. 5 is prime, and that becomes the only $x,y$ that satisfy Conjecture 1.

But what if $x,y$ didn’t have to be consecutive? Does the use of 2 still work?

Well, the short answer is sometimes.

$\boldsymbol{2+3=5}$
$\boldsymbol{2+5=7}$
$2+7=9$

Uh oh. 9 isn’t prime. Therefore, the use of 2 as $x$ or $y$ only works sometimes. This problem isn’t very interesting with only two variables though. Let’s add more…

$***************************$

Consider consecutive numbers $x,y,z \in \mathcal{P}$ where $\mathcal{P}$ is the set  of all prime numbers $\in \mathbb{N}$.

$2+3+5=10$
$3+5+7=15$
$\boldsymbol{5+7+11=23}$
$\boldsymbol{7+11+13=31}$
$\boldsymbol{11+13+17=41}$
$13+17+19=49$
$\boldsymbol{17+19+23=59}$
$\vdots$

If we continue adding numbers in this way, how many times will the resulting sum be a prime? Is there any way to predict what triples of numbers produce primes and which do not?

Here are some more examples (all of which have prime sums):

$19 + 23 + 29 = 71$
$23 + 29 + 31 = 83$
$29 + 31 + 37 = 97$
$31 + 37 + 41 = 109$
$41 + 43 + 47 = 131$
$53 + 59 + 61 = 173$
$61 + 67 + 71 = 199$
$67 + 71 + 73 = 211$
$71 + 73 + 79 = 223$
$79 + 83 + 89 = 251$
$83 + 89 + 97 = 269$
$101 + 103 + 107 = 311$
$109 + 113 + 127 = 349$
$139 + 149 + 151 = 439$
$149 + 151 + 157 = 457$
$157 + 163 + 167 = 487$
$163 + 167 + 173 = 503$
$197 + 199 + 211 = 607$

Can we derive a pattern or a formula such that $x, y, z \in \mathcal{P}$ always holds?

# The ABCs of Computer Science

So over the next few months or so, I’d like to write a series of educational posts on “The ABCs of Computer Science”. In each post, I would talk about a topic that begins with the letter of the alphabet I am on. This will not only serve as an educational resource for people wanting to learn new things or get an overview of some of the big topics in computer science, but also as a learning experiment for me.

I plan to make an ABCs post at least every two weeks, and my regular posts about thesis updates and mathematical curiosities will continue. I have a tentative list of topics but I’d like your input. What topics would you like to see me write about? What’s something you are interested to learn? What can I use for elusive letters such as Q, X, and Z? Leave your ideas in the comments below and I will do my best to incorporate them.

# Some Face Tracking With Kinect: Thesis Update #2

See the previous post in this series: Facial Expression Analysis With Microsoft Kinect : Thesis Update #1

I’ve been doing some more work on my emotion recognition project and I have a few preliminary pictures to show. The current status of the project is that I can detect faces and see the wire mesh over them, but it’s not exactly as accurate as I would like. For instance, I have noticed that wearing glasses seems to confuse the eye placement. My eyes in the wire mesh are consistently hovering above the top rim of my glasses. If I take them off, this effect is lessened. Another limitation that I noticed is that if someone is wearing a hat it will often not detect the face at all. I brought the equipment to my parent’s house last weekend and let them try it out. My dad always wears a baseball cap, and the Kinect could not recognize his face until he removed it.

Below you will see some facial expression “archetypes” that I have developed using my own face. You will notice that “sad” is not included in the list. Because of the inaccurate eye and eyebrow placement, I cannot get it to show the upturned “sad eyebrows” that I wanted. In addition, as much as I frown, it looks like the wire mesh is making a kissing face.

Definitely some things to work out but check out the faces I’ve worked on so far. I plan to get multiple people to make faces at the Kinect and see if I can get them into groups that the program can further “learn” with.

“Normal face” – a baseline

Angry face – note the eyebrows

Happy Face – smile!

Surprised face – heightened eyebrows and open mouth

As you can see, eyes are much better placed without glasses…

UPDATE: See the next posts in this series:

# Quantifying the Self

So I’ve been doing a bit of an experiment this year. Sure, everyone says they want to do this or do that, lose weight, eat better, exercise more, etc, but how do we keep ourselves to these goals? As you may be aware, the you of the future is always a bit more conscientious than the you of today: “I’ll eat  ice cream today and go on the diet tomorrow”, “Just one more day of sleeping in and I’ll get up early tomorrow.” The list goes on. Now being the geek that I am, I began to wonder if there were a more scientific way to go about all this.

Something that I’ve found that is pretty easy to do and had a big impact is simply tracking the things you want to do with your time and see how it stacks up over time. I started when I found a website called Beeminder. You can start as many “goals” as you like, such as “go to the gym twice a week” or “floss every day”. You know, those things we want to do but have a hard time actually doing. You go in and plot a data point each day and you can see your progress towards the goal. It has a “yellow brick road” for you to follow and if you do more than average one day you get “safe days” where you don’t have to work as hard. It’s really engaging to me to see my graphs grow.

As an example, here’s one of my Beeminder graphs for reading more often. I’ve been saying for years I’d like to read more, but I always seem to find other things to do instead. By tracking my reading time each day, I can see my progress over time and its really helped me to stick with it. I started out with a goal of reading 15  minutes each day, but soon bumped it up to 20, and now I’m at 25. I’ve been reading nearly every day and it feels great. I have finished The Alchemist and I’m almost done with The Hobbitwhich is more than I can usually say I’ve read 2 months into the year!

But I started to think, after using Beeminder for a while, what other things can I track? I started using a pedometer to see how many steps I walk at my university daily, and boy was I surprised! I usually walk 3 miles or more in a day just walking around to classes, to eat, to meetings, and to work. The steps add up quick, and its really neat to see what my trends are for walking as well. I haven’t been tracking this one for as long, but here’s a graph I created using google spreadsheets: (guess which data points are the weekends…heh. Of course, the pedometer is on my phone so it only tracks wherever I carry it around, which is not usually within my apartment).