Assuming a lifespan of 80 years, in what years of the 20th and 21st centuries (1900-1999), (2000-2099) would you have to be born to have the maximum number of prime birthdays in a prime year?
In what years of the same time spans would you have to be born to have the minimum number of prime birthdays in a prime year?
You may assume that people born on Feb. 29 in a leap year still celebrate their birthdays each following year.
The birth years with their number of doubly prime years are:
1900 5 1901 0 1902 6 1903 0 1904 3 1905 1 1906 4 1907 0 1908 6 1909 0
1910 3 1911 1 1912 4 1913 0 1914 6 1915 0 1916 2 1917 0 1918 4 1919 0
1920 9 1921 0 1922 3 1923 0 1924 3 1925 0 1926 9 1927 0 1928 5 1929 1
1930 5 1931 1 1932 8 1933 0 1934 3 1935 0 1936 5 1937 0 1938 7 1939 0
1940 5 1941 0 1942 4 1943 0 1944 8 1945 0 1946 6 1947 1 1948 3 1949 1
1950 9 1951 0 1952 3 1953 0 1954 3 1955 0 1956 10 1957 0 1958 5 1959 0
1960 6 1961 0 1962 6 1963 0 1964 4 1965 0 1966 6 1967 0 1968 9 1969 0
1970 7 1971 1 1972 3 1973 0 1974 9 1975 0 1976 6 1977 1 1978 2 1979 0
1980 10 1981 0 1982 6 1983 0 1984 5 1985 1 1986 9 1987 0 1988 5 1989 0
1990 6 1991 1 1992 8 1993 0 1994 5 1995 1 1996 6 1997 1 1998 7 1999 0
2000 5 2001 1 2002 4 2003 0 2004 5 2005 0 2006 4 2007 0 2008 6 2009 1
2010 10 2011 0 2012 4 2013 0 2014 4 2015 1 2016 9 2017 0 2018 2 2019 0
2020 6 2021 0 2022 9 2023 0 2024 4 2025 1 2026 6 2027 1 2028 6 2029 0
2030 3 2031 0 2032 5 2033 0 2034 6 2035 0 2036 4 2037 1 2038 4 2039 0
2040 9 2041 0 2042 4 2043 0 2044 4 2045 0 2046 8 2047 0 2048 2 2049 0
2050 7 2051 1 2052 9 2053 0 2054 2 2055 0 2056 5 2057 0 2058 10 2059 0
2060 5 2061 1 2062 5 2063 0 2064 8 2065 0 2066 5 2067 1 2068 6 2069 0
2070 12 2071 0 2072 5 2073 0 2074 5 2075 0 2076 9 2077 0 2078 5 2079 1
2080 6 2081 1 2082 10 2083 0 2084 6 2085 1 2086 4 2087 1 2088 6 2089 0
2090 5 2091 0 2092 4 2093 0 2094 8 2095 0 2096 4 2097 1 2098 3 2099 0
2100 10
The year 2100 has been included so that any definition of the 21st century can be counted.
The largest number is 12, for someone born in 2070
The program to produce this is
5 cls
10 for Y=1900 to 2100
20 T=0
30 for Age=1 to 80
40 if nxtprm(Y+Age-1)=Y+Age and nxtprm(Age-1)=Age then T=T+1
50 next Age
60 Row=(Y-1900)\10:Col=((Y-1900)@10)*8
70 locate Col,Row:print using(5,0),Y;using(3,0),T;
80 next Y
A different program details the years and ages of a person to be born in 2070:
2070
2081 11
2083 13
2087 17
2089 19
2099 29
2111 41
2113 43
2129 59
2131 61
2137 67
2141 71
2143 73
The minimum is zero, as anyone born in an odd year that's not two years before a prime year will always have his prime ages in even years, except for the second birthday, which in the cases considered is not prime.
|
Posted by Charlie
on 2005-03-23 20:35:17 |