This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A088673 #12 Nov 07 2024 15:47:50 %S A088673 0,0,1,1,2,0,3,0,1,2,1,2,3,4,0,4,5,0,1,2,3,1,2,3,4,5,6,0,5,6,7,0,1,2, %T A088673 3,4,1,2,3,4,5,6,7,8,0,6,7,8,9,0,1,2,3,4,5,1,2,3,4,5,6,7,8,9,10,0,7,8, %U A088673 9,10,11,0,1,2,3,4,5,6,1,2,3,4,5,6,7,8,9,10,11,12,0,8,9,10,11,12,13,0,1,2 %N A088673 a(n) = n mod A002024(n), where A002024 is "n appears n times": 1, 2, 2, 3, 3, 3, ... %e A088673 a(7) = 3: A002024(7) = 4 and 7 mod 4 = 3. %t A088673 Table[Mod[n,Floor[1/2+Sqrt[2n]]],{n,100}] (* _Harvey P. Dale_, Feb 09 2013 *) %o A088673 (Python) %o A088673 from math import isqrt %o A088673 def A088673(n): return n%((m:=isqrt(k:=n<<1))+(k>m*(m+1))) # _Chai Wah Wu_, Nov 07 2024 %Y A088673 Cf. A002024. %K A088673 nonn,easy %O A088673 1,5 %A A088673 _Gary W. Adamson_, Oct 04 2003 %E A088673 Corrected and extended by _Ray Chandler_, Oct 04 2003 %E A088673 Corrected offset by _Chai Wah Wu_, Nov 07 2024