# Jim Propp’s “Dime and Penny Switcheroo” tweet

Happened to see this tweet from Jim Propp today:

Seemed like a fun game to try. The rules were in a companion tweet:

Thought it would be fun to try out with the boys. Unluckily my older son had an after school activity today, so here’s my younger son playing the game:

Definitely a fun little game for kids to play with!

[post publication update – here’s my older son:

]

# Last Digits of consecutive twin primes up to 148 billion

I wrote a little bit about the last digits of consecutive twin primes yesterday in this blog post:

The distribution of the last digits of consecutive twin primes is strange

My data is in this spreadsheet:

My google doc with twin prime counts – see the “Improved Twin Prime Sheet” tab

I’m looking at these patterns because of the new result about prime numbers discussed in this Evelyn Lamb article:

Evelyn Lamb’s article about the new result about last digits of prime number

Last night – just by coincidence – I noticed that the value of one of the error terms I was wondering about was surprisingly close to 1/(100*e). I was playing with the numbers up to the 5 billionth prime yesterday. The numbers up to the 6 billionth prime made this error term even a bit closer to 1/(100*e).

I have a hard time believing that the error term I was noticing can be represented in such a simple way, but for now . . . here is my guess at the count for the various digit sequences of consecutive twin primes up to a number X.

Let $X$ be the number you are counting up to.
Let $N$ be the number of twin primes up to $X$
Let $\alpha$ be the number $1 / (100*e)$

Let $L(X)$ be shorthand for $Log(Log(X) / Log(x)^2$

The the number of consecutive twin primes with the following last digit sequences is approximately:

{(1,3) (1,3)} : (N/9)*( 1 – $\alpha$ – 9*$L(x)$ )
(1,3) (7,9) : (N/9)*( 1 + $\alpha$ +9*$L(x)$ )
(1,3) (9,1) : (N/9)*( 1 )

(7,9) (1,3) : (N/9)*( 1 + $\alpha$ )
(7,9) (7,9) : (N/9)*( 1 – $\alpha$ – 9*$L(x)$ )
(7,9) (9,1) : (N/9)*( 1 + 9*$L(x)$ )

(9,1) (1,3) : (N/9)*( 1 + 9*$L(x)$ )
(9,1) (7,9) : (N/9)*( 1 )
(9,1) (9,1) : (N/9)*( 1 – 9*$L(x)$ )

Comparing the actual counts to the formula up to 1 billionth, 2 billionth, and up to the 6 billionth prime you get these results (from the google doc)

Actual Counts:

The formulas above give these estimates:

and the errors between the formula and the actual count are:

The strange thing about this result is that it appears that there are more pairs of consecutive twin primes with last digits  (9,1) (9,1) than there are with either last digits (1,3) (1,3) or (7,9) (7,9).

The difference is that strange factor of 1 – 1/(100*e).