This past year our family members were 43, 43, 13, and 11 years old, which are all prime numbers. I wondered if there was or will be any other year where this will happen. There was probably a real math way to figure this out, but it was easier just to brute force calculate each year.
I took out the obvious years (where we are even ages), so starting when our daughter was born, I calculated how old each of us was or will be.
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(primes)
ages <- tibble(yr = seq(2011, 2075, 2))
ages <- ages %>% mutate(parents = yr - 1976, boy = yr - 2006, girl = yr - 2008)
ages %>% mutate(parents_prime = is_prime(parents), boy_prime = is_prime(boy), girl_prime = is_prime(girl)) %>%
filter(parents_prime, boy_prime, girl_prime)
## # A tibble: 4 x 7
## yr parents boy girl parents_prime boy_prime girl_prime
## <dbl> <dbl> <dbl> <dbl> <lgl> <lgl> <lgl>
## 1 2013 37 7 5 TRUE TRUE TRUE
## 2 2019 43 13 11 TRUE TRUE TRUE
## 3 2037 61 31 29 TRUE TRUE TRUE
## 4 2049 73 43 41 TRUE TRUE TRUE
After the calculation, 2013, 2019, 2037, and 2049 were the only years in which all our ages were prime numbers. Hopefully we will still be around in 2037 to enjoy our next prime age!