Living in prime years

A human was born somewhere in interval of [1;1920] A.D. They lived exactly 100 years. They lived through more years that were prime numbers than any other human (of the same lifespan) who was born in a different year from that interval of [1;1920] A.D.

Question: In what year was the human born and how many prime number years did they experience? (You can assume that the person was born in the first day of their year of birth and died on the very last day of the year of their death. Both the year of birth and the year of death can be counted as experienced if they were prime numbers.)

• So the person actually lived just under 100 years? e.g. from 1st Jan 1400 to 31st Dec 1499? – ZanyG Jan 12 '20 at 9:45
• @ZanyG [1400;1499] includes 100 years, not 99. Remember, 1400 would be their first year. – user161005 Jan 12 '20 at 9:53

They were born in the year

2 AD, and experienced 26 'prime' years.

In fact, note that

the number of primes is only going to decrease from 26. Considering $$\pi(x)=x/\log(x)$$, the prime counting function that approximates the number of primes up to $$x$$, it is obvious that $$\pi(x+100)-\pi(x)$$, the approximation of the number of primes in the interval $$[x, x+100]$$, is strictly decreasing.

• This is correct! – user161005 Jan 12 '20 at 9:54
• Minor gripe on the third sentence of the puzzle: someone born (at any time up to) exactly 1 year earlier would have lived though exactly the same prime-numbered years. – Bass Jan 12 '20 at 20:07
• The Anno Domini system was devised in 525, so it could be argued that the answer is the maximum for n>=525. It also isn't the case that that expression is strictly decreasing, it isn't even decreasing, and sometimes increases in a seemingly random way – James K Jan 12 '20 at 21:31
• It is not true that $\pi(x)=\frac{x}{\log x}$, only that the RHS is a good approximation to the LHS in a certain sense. And $\pi(x+100)-\pi(x)$ is not a strictly decreasing function; it increases when $x+100$ is prime and $x$ isn't, so e.g. at $x=9$ or $x=27$. In fact it increases infinitely often because there are infinitely many primes that are 1 mod 3, and for any of these the number 100 earlier is a multiple of 3 and hence (other than for 103->3 itself) not prime. – Gareth McCaughan Jan 12 '20 at 22:13
• (Sorry, didn't notice that James had already pointed out that the function isn't strictly decreasing.) – Gareth McCaughan Jan 12 '20 at 22:13