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 A286235 #29 Jun 12 2025 10:16:57 %S A286235 1,2,1,4,1,3,7,2,3,3,11,2,3,3,10,16,4,5,3,10,3,22,4,5,3,10,3,21,29,7, %T A286235 5,5,10,3,21,10,37,7,8,5,10,3,21,10,21,46,11,8,5,14,3,21,10,21,10,56, %U A286235 11,8,5,14,3,21,10,21,10,55,67,16,12,8,14,5,21,10,21,10,55,10,79,16,12,8,14,5,21,10,21,10,55,10,78,92,22,12,8,14,5,27,10,21,10,55,10,78,21 %N A286235 Triangular table T(n,k) = P(phi(k), floor(n/k)), where P is sequence A000027 used as a pairing function N x N -> N, and phi is Euler totient function, A000010. Table is read by rows as T(1,1), T(2,1), T(2,2), etc. %C A286235 Equally: square array A(n,k) = P(A000010(n), floor((n+k-1)/n)), read by descending antidiagonals as A(1,1), A(1,2), A(2,1), etc. Here P is a two-argument form of sequence A000027 used as a pairing function N x N -> N. %H A286235 Antti Karttunen, <a href="/A286235/b286235.txt">Table of n, a(n) for n = 1..10585; the first 145 antidiagonals of array</a> %H A286235 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a> %F A286235 As a triangle (with n >= 1, 1 <= k <= n): %F A286235 T(n,k) = (1/2)*(2 + ((A000010(k)+floor(n/k))^2) - A000010(k) - 3*floor(n/k)). %e A286235 The first fifteen rows of the triangle: %e A286235 1, %e A286235 2, 1, %e A286235 4, 1, 3, %e A286235 7, 2, 3, 3, %e A286235 11, 2, 3, 3, 10, %e A286235 16, 4, 5, 3, 10, 3, %e A286235 22, 4, 5, 3, 10, 3, 21, %e A286235 29, 7, 5, 5, 10, 3, 21, 10, %e A286235 37, 7, 8, 5, 10, 3, 21, 10, 21, %e A286235 46, 11, 8, 5, 14, 3, 21, 10, 21, 10, %e A286235 56, 11, 8, 5, 14, 3, 21, 10, 21, 10, 55, %e A286235 67, 16, 12, 8, 14, 5, 21, 10, 21, 10, 55, 10, %e A286235 79, 16, 12, 8, 14, 5, 21, 10, 21, 10, 55, 10, 78, %e A286235 92, 22, 12, 8, 14, 5, 27, 10, 21, 10, 55, 10, 78, 21, %e A286235 106, 22, 17, 8, 19, 5, 27, 10, 21, 10, 55, 10, 78, 21, 36 %t A286235 Map[(2 + (#1 + #2)^2 - #1 - 3 #2)/2 & @@ # & /@ # &, Table[{EulerPhi@ k, Floor[n/k]}, {n, 14}, {k, n}]] // Flatten (* _Michael De Vlieger_, May 06 2017 *) %o A286235 (Scheme) %o A286235 (define (A286235 n) (A286235bi (A002260 n) (A004736 n))) %o A286235 (define (A286235bi row col) (let ((a (A000010 row)) (b (quotient (+ row col -1) row))) (* (/ 1 2) (+ (expt (+ a b) 2) (- a) (- (* 3 b)) 2)))) %o A286235 (Python) %o A286235 from sympy import totient %o A286235 def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2 %o A286235 def t(n, k): return T(totient(k), int(n//k)) %o A286235 for n in range(1, 21): print([t(n, k) for k in range(1, n + 1)]) # _Indranil Ghosh_, May 11 2017 %Y A286235 Transpose: A286234. %Y A286235 Cf. A000010, A000027, A286156, A286245. %Y A286235 Cf. A286237 (same triangle but with zeros in positions where k does not divide n). %K A286235 nonn,tabl %O A286235 1,2 %A A286235 _Antti Karttunen_, May 05 2017