I was reading Karpathy's implementation of Bitcoin from scratch in Python, and he commented:
# recalculate the target at every epoch (2016 blocks), approx 2 week period
# note that Satoshi had an off-by-one bug in this calculation because we are
# looking at timestamp difference between first and last block in an epoch,
# so these are only 2015 blocks apart instead of 2016 blocks apart ¯\_(ツ)_/¯
I think he is actually correct. That number should be 2015, and not 2016, right?
Or is there something I'm not considering?