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 A124171 #19 Aug 06 2025 11:14:21 %S A124171 1,1,2,3,1,2,3,4,5,6,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,11,12, %T A124171 13,14,15,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,1,2,3, %U A124171 4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,1,2,3 %N A124171 Sequence obtained by reading the triangles shown below by rows. %C A124171 It appears that this is also a triangle read by rows in which row n lists the first A000217(n) positive integers, n >= 1 (see example, second part). - _Omar E. Pol_, May 29 2012 %H A124171 Harvey P. Dale, <a href="/A124171/b124171.txt">Table of n, a(n) for n = 1..1000</a> %e A124171 1 %e A124171 1 %e A124171 2 3 %e A124171 1 %e A124171 2 3 %e A124171 4 5 6 %e A124171 1 %e A124171 2 3 %e A124171 4 5 6 %e A124171 7 8 9 10 %e A124171 1 %e A124171 2 3 %e A124171 4 5 6 %e A124171 7 8 9 10 %e A124171 11 12 13 14 15 %e A124171 From _Omar E. Pol_, May 29 2012: (Start) %e A124171 Written as an irregular triangle the sequence begins: %e A124171 1; %e A124171 1, 2, 3; %e A124171 1, 2, 3, 4, 5, 6; %e A124171 1, 2, 3, 4, 5, 6, 7, 8, 9, 10; %e A124171 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15; %e A124171 Row n has length A000217(n). (End) %p A124171 A000217 := proc(n) n*(n+1)/2 ; end : for t from 1 to 10 do for i from 1 to A000217(t) do printf("%d, ",i) ; od ; od ; # _R. J. Mathar_, May 18 2007 %t A124171 Table[Range[(t(t+1))/2],{t,10}]//Flatten (* _Harvey P. Dale_, Aug 06 2025 *) %o A124171 (Python) %o A124171 from math import comb %o A124171 from sympy import integer_nthroot %o A124171 def A124171(n): return n-comb((m:=integer_nthroot(6*n,3)[0])+(n>comb(m+2,3))+1,3) # _Chai Wah Wu_, Nov 10 2024 %Y A124171 See A115215 for another version. %K A124171 nonn,tabf,easy %O A124171 1,3 %A A124171 _Colm Mulcahy_, Dec 05 2006 %E A124171 More terms from _R. J. Mathar_, May 18 2007