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”).
%I #48 May 26 2023 14:10:04
%S 2,4,6,7,9,11,11,13,15,17,16,18,20,22,24,22,24,26,28,30,32,29,31,33,
%T 35,37,39,41,37,39,41,43,45,47,49,51,46,48,50,52,54,56,58,60,62,56,58,
%U 60,62,64,66,68,70,72,74,67,69,71,73,75,77,79,81,83,85,87
%N Triangle read by rows: T(n,k) = ((n-1)*(n+2))/2 + 2*k.
%C The first column of the triangle is the Lazy Caterer's sequence A000124.
%C Each subsequent column starts with A000124(n) + (2 * (n-1)).
%C The first downward diagonal is A046691(n).
%C Columns and downward diagonals of the triangle identify many sequences (possibly shifted) in the database. Examples can be found in crossrefs below.
%C The sum of the n-th upward diagonal of the triangle is A356288(n).
%F T(n,k) = ((n-1) * (n+2))/2 + 2*k.
%F T(n,k+1) = T(n,k) + 2, k < n.
%e Triangle T(n,k) begins:
%e n\k 1 2 3 4 5 6 7 8 9 10 11 ...
%e 1: 2
%e 2: 4 6
%e 3: 7 9 11
%e 4: 11 13 15 17
%e 5: 16 18 20 22 24
%e 6: 22 24 26 28 30 32
%e 7: 29 31 33 35 37 39 41
%e 8: 37 39 41 43 45 47 49 51
%e 9: 46 48 50 52 54 56 58 60 62
%e 10: 56 58 60 62 64 66 68 70 72 74
%e 11: 67 69 71 73 75 77 79 81 83 85 87
%e ...
%t Table[((n-1)(n+2))/2+2k,{n,20},{k,n}]//Flatten (* _Harvey P. Dale_, May 26 2023 *)
%o (Python)
%o def T(n, k): return ((n-1) * (n+2))//2 + 2*k
%o for n in range(1, 12):
%o for k in range(1,(n+1)): print(T(n,k), end = ', ')
%o (Python)
%o # Indexed as a linear sequence.
%o def a000124(n): return n*(n+1)//2 + 1
%o def a(n):
%o l = m = 0
%o for k in range(1,n):
%o lc = a000124(k - 1)
%o if n >= lc:
%o l = lc
%o m = k
%o else: break
%o return n + m + (n - l)
%Y Cf. A000124, A004120, A046691, A051938, A055999, A056000, A155212, A167487, A167499, A167614, A246172, A334563, A356288.
%K nonn,tabl,easy
%O 1,1
%A _Torlach Rush_, Aug 25 2022