OFFSET
1,5
EXAMPLE
a(7) = 3: A002024(7) = 4 and 7 mod 4 = 3.
MATHEMATICA
Table[Mod[n, Floor[1/2+Sqrt[2n]]], {n, 100}] (* Harvey P. Dale, Feb 09 2013 *)
PROG
(Python)
from math import isqrt
def A088673(n): return n%((m:=isqrt(k:=n<<1))+(k>m*(m+1))) # Chai Wah Wu, Nov 07 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Oct 04 2003
EXTENSIONS
Corrected and extended by Ray Chandler, Oct 04 2003
Corrected offset by Chai Wah Wu, Nov 07 2024
STATUS
approved