login
Sequence obtained by reading the triangles shown below by rows.
4

%I #14 Nov 10 2024 17:17:21

%S 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 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 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 Sequence obtained by reading the triangles shown below by rows.

%C 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

%e 1

%e 1

%e 2 3

%e 1

%e 2 3

%e 4 5 6

%e 1

%e 2 3

%e 4 5 6

%e 7 8 9 10

%e 1

%e 2 3

%e 4 5 6

%e 7 8 9 10

%e 11 12 13 14 15

%e From _Omar E. Pol_, May 29 2012: (Start)

%e Written as an irregular triangle the sequence begins:

%e 1;

%e 1, 2, 3;

%e 1, 2, 3, 4, 5, 6;

%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 10;

%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15;

%e Row n has length A000217(n). (End)

%p 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

%o (Python)

%o from math import comb

%o from sympy import integer_nthroot

%o 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 See A115215 for another version.

%K nonn,tabf,easy

%O 1,3

%A _Colm Mulcahy_, Dec 05 2006

%E More terms from _R. J. Mathar_, May 18 2007