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 A286156 #32 Mar 26 2025 19:12:08 %S A286156 1,2,3,2,1,6,2,5,4,10,2,5,1,3,15,2,5,9,4,7,21,2,5,9,1,8,6,28,2,5,9,14, %T A286156 4,3,11,36,2,5,9,14,1,8,7,10,45,2,5,9,14,20,4,13,12,16,55,2,5,9,14,20, %U A286156 1,8,3,6,15,66,2,5,9,14,20,27,4,13,7,11,22,78,2,5,9,14,20,27,1,8,19,12,17,21,91,2,5,9,14,20,27,35,4,13,3,18,10,29,105 %N A286156 A(n,k) = T(remainder(n,k), quotient(n,k)), where T(n,k) is sequence A001477 considered as a two-dimensional table, square array read by descending antidiagonals. %H A286156 Antti Karttunen, <a href="/A286156/b286156.txt">Table of n, a(n) for n = 1..10585; the first 145 antidiagonals of array</a> %H A286156 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a> %F A286156 A(n,k) = T(remainder(n,k), quotient(n,k)), where T(n,k) is sequence A001477 considered as a two-dimensional table, that is, as a pairing function from [0, 1, 2, 3, ...] x [0, 1, 2, 3, ...] to [0, 1, 2, 3, ...]. This sequence lists only values for indices n >= 1, k >= 1. %e A286156 The top left 15 X 15 corner of the array: %e A286156 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 %e A286156 3, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 %e A286156 6, 4, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9 %e A286156 10, 3, 4, 1, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14 %e A286156 15, 7, 8, 4, 1, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 %e A286156 21, 6, 3, 8, 4, 1, 27, 27, 27, 27, 27, 27, 27, 27, 27 %e A286156 28, 11, 7, 13, 8, 4, 1, 35, 35, 35, 35, 35, 35, 35, 35 %e A286156 36, 10, 12, 3, 13, 8, 4, 1, 44, 44, 44, 44, 44, 44, 44 %e A286156 45, 16, 6, 7, 19, 13, 8, 4, 1, 54, 54, 54, 54, 54, 54 %e A286156 55, 15, 11, 12, 3, 19, 13, 8, 4, 1, 65, 65, 65, 65, 65 %e A286156 66, 22, 17, 18, 7, 26, 19, 13, 8, 4, 1, 77, 77, 77, 77 %e A286156 78, 21, 10, 6, 12, 3, 26, 19, 13, 8, 4, 1, 90, 90, 90 %e A286156 91, 29, 16, 11, 18, 7, 34, 26, 19, 13, 8, 4, 1, 104, 104 %e A286156 105, 28, 23, 17, 25, 12, 3, 34, 26, 19, 13, 8, 4, 1, 119 %e A286156 120, 37, 15, 24, 6, 18, 7, 43, 34, 26, 19, 13, 8, 4, 1 %t A286156 Map[((#1 + #2)^2 + 3 #1 + #2)/2 & @@ # & /@ Reverse@ # &, Table[Function[m, Reverse@ QuotientRemainder[m, k]][n - k + 1], {n, 14}, {k, n}]] // Flatten (* _Michael De Vlieger_, May 20 2017 *) %o A286156 (Scheme) %o A286156 (define (A286156 n) (A286156bi (A002260 n) (A004736 n))) %o A286156 (define (A286156bi row col) (if (zero? col) -1 (let ((a (remainder row col)) (b (quotient row col))) (/ (+ (expt (+ a b) 2) (* 3 a) b) 2)))) %o A286156 (Python) %o A286156 def T(a, b): return ((a + b)**2 + 3*a + b)//2 %o A286156 def A(n, k): return T(n%k, n//k) %o A286156 for n in range(1, 21): print([A(k, n - k + 1) for k in range(1, n + 1)]) # _Indranil Ghosh_, May 20 2017 %Y A286156 Cf. A286157 (transpose), A286158 (lower triangular region), A286159 (lower triangular region transposed). %Y A286156 Cf. A000217 (column 1), A000012 (the main diagonal), A000096 (superdiagonal), A034856. %Y A286156 Cf. A001477, A285722, A286101, A286102. %K A286156 nonn,tabl %O A286156 1,2 %A A286156 _Antti Karttunen_, May 04 2017