cp's OEIS Frontend

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.

A108872 Sums of ordinal references for a triangular table read by columns, top to bottom.

This page as a plain text file.
%I A108872 #30 Nov 09 2024 07:02:38
%S A108872 2,3,4,4,5,6,5,6,7,8,6,7,8,9,10,7,8,9,10,11,12,8,9,10,11,12,13,14,9,
%T A108872 10,11,12,13,14,15,16,10,11,12,13,14,15,16,17,18,11,12,13,14,15,16,17,
%U A108872 18,19,20,12,13,14,15,16,17,18,19,20,21,22,13,14,15,16,17,18,19,20,21,22
%N A108872 Sums of ordinal references for a triangular table read by columns, top to bottom.
%C A108872 The ordinal references (i,j) for a triangular table are arranged as follows:
%C A108872   (1,1) (2,1) (3,1)
%C A108872   ..... (2,2) (3,2)
%C A108872   ........... (3,3)
%C A108872 The sequence comprises the sum of each reference in each column, read top to bottom. A similar sequence is A003057, which consists of the sums of the ordinal references for an array read by antidiagonals.
%C A108872 Subtriangle of triangle in A051162. - _Philippe Deléham_, Mar 26 2013
%C A108872 First 9 rows coincide with triangle A248110; T(n,k) = A002260(n,k) + n; T(2*n-1,n) = A016789(n-1). - _Reinhard Zumkeller_, Oct 01 2014
%H A108872 Reinhard Zumkeller, <a href="/A108872/b108872.txt">Rows n = 1..125 of triangle, flattened</a>
%H A108872 NRICH discussion thread, <a href="https://web.archive.org/web/20151209013049/http://nrich.maths.org/askedNRICH/edited/3225.html">Floor Function Identity</a>. [Via Wayback Machine]
%F A108872 a(n) = a(i, j) = i + j
%F A108872 a(n) = A002024(n) + A002260(n) = floor(1/2 + sqrt(2n)) + n - (m(m+1)/2) + 1, where m = floor((sqrt(8n+1) - 1) / 2 ). The floor function may be computed directly by using the expression floor(x) = x + (arctan(cot(Pi*x)) / Pi) - 1/2 (equation from nrich.maths.org, see links).
%F A108872 Sum_{k=0..n} T(n,k) = A005449(n+1). - _Philippe Deléham_, Mar 26 2013
%e A108872 a(1) = (1,1) = 1 + 1 = 2
%e A108872 a(2) = (2,1) = 2 + 1 = 3
%e A108872 a(3) = (2,2) = 2 + 2 = 4
%e A108872 a(4) = (3,1) = 3 + 1 = 4, etc.
%e A108872 Triangle begins:
%e A108872   2
%e A108872   3, 4
%e A108872   4, 5, 6
%e A108872   5, 6, 7, 8
%e A108872   6, 7, 8, 9, 10
%e A108872   7, 8, 9, 10, 11, 12
%e A108872   8, 9, 10, 11, 12, 13, 14
%e A108872   9, 10, 11, 12, 13, 14, 15, 16
%e A108872   ... - _Philippe Deléham_, Mar 26 2013
%t A108872 Flatten[ Table[i + j, {j, 1, 12}, {i, 1, j}]] (* _Jean-François Alcover_, Oct 07 2011 *)
%o A108872 (Haskell)
%o A108872 a108872 n k = a108872_tabl !! (n-1) !! (k-1)
%o A108872 a108872_row n = a108872_tabl !! (n-1)
%o A108872 a108872_tabl = map (\x -> [x + 1 .. 2 * x]) [1..]
%o A108872 -- _Reinhard Zumkeller_, Oct 01 2014
%o A108872 (Python)
%o A108872 from math import isqrt
%o A108872 def A108872(n): return n+((r:=(m:=isqrt(k:=n<<1))+(k>m*(m+1)))*(3-r)>>1) # _Chai Wah Wu_, Nov 08 2024
%Y A108872 Cf. A003057.
%Y A108872 Cf. A002024, A002260.
%Y A108872 Cf. A005408, A005843.
%Y A108872 Cf. A016789 (central terms), A248110.
%K A108872 easy,nonn,tabl
%O A108872 1,1
%A A108872 _Andrew S. Plewe_, Jul 13 2005
%E A108872 Offset changed by _Reinhard Zumkeller_, Oct 01 2014