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 A227179 #23 Jul 03 2025 15:25:19 %S A227179 0,0,0,1,2,0,1,2,3,4,5,6,0,1,2,3,4,5,6,7,8,9,10,11,12,0,1,2,3,4,5,6,7, %T A227179 8,9,10,11,12,13,14,15,16,17,18,19,20,0,1,2,3,4,5,6,7,8,9,10,11,12,13, %U A227179 14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30 %N A227179 After initial 0, integers from 0 to n(n-1) followed by integers from 0 to n(n+1) and so on. %H A227179 Antti Karttunen, <a href="/A227179/b227179.txt">Table of n, a(n) for n = 0..9951</a> %F A227179 a(n) = n - (1 + A006527(A227177(n)-1)). %t A227179 Flatten[(Range[(#-2) (#-1)+1]-1&)[Range[7]]] (* _Peter J. C. Moses_, Jul 11 2013 *) %o A227179 (Scheme) (define (A227179 n) (- n (+ 1 (A006527 (- (A227177 n) 1))))) %o A227179 (Python) %o A227179 from sympy import integer_nthroot %o A227179 def A227179(n): return n-1-(f:=lambda x:x*(x**2+2))((m:=integer_nthroot(k:=3*n,3)[0])-(k<=f(m)))//3 # _Chai Wah Wu_, Nov 07 2024 %Y A227179 Cf. A002378, A006527, A227177, A227181, A227182. %K A227179 nonn %O A227179 0,5 %A A227179 _Antti Karttunen_, Jul 03 2013