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 A329598 #34 Mar 08 2025 14:57:58 %S A329598 2,6,11,18,26,35,46,58,71,85,101,118,136,155,175,197,220,244,269,295, %T A329598 322,351,381,412,444,477,511,546,583,621,660,700,741,783,826,870,916, %U A329598 963,1011,1060,1110,1161,1213,1266,1320,1376,1433,1491,1550,1610,1671,1733 %N A329598 Partial sums of the nontriangular numbers (A014132). %C A329598 Terms which are triangular: 6, 136, 351, 741, 2415, 3916, 5995, 12561, 17391, 23436, ..., . %D A329598 John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 64. %F A329598 a(n) = Sum_{i=1..n} A014132(i). %F A329598 a(n) = A000217(n) + A060432(n). [corrected by _Gerald Hillier_, Jul 31 2022] %e A329598 The nontriangular numbers begin 2, 4, 5, 7, ..., so their partial sums begin 2, 6, 11, 18, etc. %t A329598 triQ[n_] := IntegerQ @ Sqrt[8n + 1]; Accumulate@ Select[ Range@ 70, !triQ@# &] %o A329598 (Python) %o A329598 from math import isqrt %o A329598 def A329598(n): return (k:=(r:=isqrt(m:=n+1<<1))+int((m<<2)>(r<<2)*(r+1)+1)-1)*(k*(-k - 3) + 6*n - 2)//6 + (n*(n+3)>>1) # _Chai Wah Wu_, Jun 18 2024 %Y A329598 Cf. A329472, A014132, A086849. %Y A329598 Cf. A000217, A060432. %K A329598 nonn %O A329598 1,1 %A A329598 _Metin Sariyar_ and _Robert G. Wilson v_, Nov 17 2019