OFFSET
1,1
REFERENCES
V. Reddy and S. Skiena, Frequencies of large distances in integer lattices, in Graph theory, combinatorics and algorithms, Vol. 1, 2 (Kalamazoo, MI, 1992), 981-989, Wiley-Intersci. Publ., Wiley, New York, 1995.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
FORMULA
a(n) = 2 * n if n is a perfect square, otherwise a(n) = 4 * (n - f(n)) * (ceiling(2 * sqrt(n)) - n + f(n)) where f(n) = floor(floor(2 * sqrt(n))^2 / 4) [from Reddy and Skiena]. - Sean A. Irvine, Jan 08 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Sean A. Irvine, Jan 08 2018
STATUS
approved