OFFSET
0,5
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
FORMULA
a(n) = SUM[i=0..n] distance from i to nearest triangular number = SUM[i=0..n]MIN{|i - (k*(k+1)/2)|} = SUM[i=0..n] MIN{|A000217(i) - i|}.
PROG
(Haskell)
a133610 n = a133610_list !! n
a133610_list = scanl1 (+) a053616_list
-- Reinhard Zumkeller, Jan 24 2014
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Dec 28 2007
EXTENSIONS
Data corrected by Reinhard Zumkeller, Jan 24 2014
STATUS
approved