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 A227177 #32 Nov 07 2024 15:45:45 %S A227177 0,1,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5, %T A227177 5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, %U A227177 6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7 %N A227177 n occurs n^2 - n + 1 times. %C A227177 a(n) is the least integer k such that A006527(k) >= n, which implies that each n occurs A002061(n) times. %H A227177 Antti Karttunen, <a href="/A227177/b227177.txt">Table of n, a(n) for n = 0..9951</a> %F A227177 a(k + (j^3-j^2+5*j)/3) = j for all j>=0, k=0..(j^2-j). - _Jinyuan Wang_, Nov 24 2018 %F A227177 a(n) = m+1 if 3n>m*(m^2+2) and a(n) = m otherwise where m=floor((3n)^(1/3)). - _Chai Wah Wu_, Nov 07 2024 %t A227177 Flatten[Map[ConstantArray[#,(#-2) (#-1)+1]-1&,Range[7]]] (* _Peter J. C. Moses_, Jul 14 2013 *) %t A227177 Flatten[Table[#,{#^2-#+1}]&/@Range[0,7]] (* _Harvey P. Dale_, Sep 25 2013 *) %o A227177 (Scheme, with _Antti Karttunen_'s IntSeq-library): (define A227177 (LEAST-GTE-I 0 0 A006527)) %o A227177 (PARI) vec(N)=concat(vector(N, i, vector(i^2-i+1, j, i))) \\ _Jinyuan Wang_, Dec 01 2018 %o A227177 (Python) %o A227177 from sympy import integer_nthroot %o A227177 def A227177(n): return (m:=integer_nthroot(k:=3*n,3)[0])+(k>m*(m**2+2)) # _Chai Wah Wu_, Nov 07 2024 %Y A227177 Cf. A000196, A002061, A006527, A227179, A227181, A227147. %K A227177 nonn %O A227177 0,3 %A A227177 _Antti Karttunen_, Jul 03 2013