login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A124171
Sequence obtained by reading the triangles shown below by rows.
4
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, 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, 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
OFFSET
1,3
COMMENTS
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
EXAMPLE
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 13 14 15
From Omar E. Pol, May 29 2012: (Start)
Written as an irregular triangle the sequence begins:
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, 13, 14, 15;
Row n has length A000217(n). (End)
MAPLE
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
PROG
(Python)
from math import comb
from sympy import integer_nthroot
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
CROSSREFS
See A115215 for another version.
Sequence in context: A071797 A338027 A025481 * A276146 A210530 A076645
KEYWORD
nonn,tabf,easy
AUTHOR
Colm Mulcahy, Dec 05 2006
EXTENSIONS
More terms from R. J. Mathar, May 18 2007
STATUS
approved