OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = 8*n^2 - floor(n*sqrt(8))^2.
EXAMPLE
a(2) = 8*2^2-floor(2*sqrt(8))^2 = 32-25 = 7.
MAPLE
MATHEMATICA
Table[8n^2-Floor[n*Sqrt[8]]^2, {n, 64}] (* James C. McMahon, Oct 19 2024 *)
PROG
(PARI) a(n) = 8*n^2 - sqrtint(8*n^2)^2 \\ Charles R Greathouse IV, Feb 15 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Aug 02 2006
STATUS
approved