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.

A286245 Triangular table T(n,k) = P(A046523(k), floor(n/k)), read by rows as T(1,1), T(2,1), T(2,2), etc. Here P is sequence A000027 used as a pairing function N x N -> N.

This page as a plain text file.
%I A286245 #25 Jun 09 2025 18:23:10
%S A286245 1,2,3,4,3,3,7,5,3,10,11,5,3,10,3,16,8,5,10,3,21,22,8,5,10,3,21,3,29,
%T A286245 12,5,14,3,21,3,36,37,12,8,14,3,21,3,36,10,46,17,8,14,5,21,3,36,10,21,
%U A286245 56,17,8,14,5,21,3,36,10,21,3,67,23,12,19,5,27,3,36,10,21,3,78,79,23,12,19,5,27,3,36,10,21,3,78,3
%N A286245 Triangular table T(n,k) = P(A046523(k), floor(n/k)), read by rows as T(1,1), T(2,1), T(2,2), etc. Here P is sequence A000027 used as a pairing function N x N -> N.
%C A286245 Equally: square array A(n,k) = P(A046523(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 A286245 Antti Karttunen, <a href="/A286245/b286245.txt">Table of n, a(n) for n = 1..10585; the first 145 rows of triangle/antidiagonals of array</a>
%H A286245 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a>
%F A286245 As a triangle (with n >= 1, 1 <= k <= n):
%F A286245 T(n,k) = (1/2)*(2 + ((A046523(k)+floor(n/k))^2) - A046523(k) - 3*floor(n/k)).
%e A286245 The first fifteen rows of triangle:
%e A286245     1,
%e A286245     2,  3,
%e A286245     4,  3,  3,
%e A286245     7,  5,  3, 10,
%e A286245    11,  5,  3, 10, 3,
%e A286245    16,  8,  5, 10, 3, 21,
%e A286245    22,  8,  5, 10, 3, 21, 3,
%e A286245    29, 12,  5, 14, 3, 21, 3, 36,
%e A286245    37, 12,  8, 14, 3, 21, 3, 36, 10,
%e A286245    46, 17,  8, 14, 5, 21, 3, 36, 10, 21,
%e A286245    56, 17,  8, 14, 5, 21, 3, 36, 10, 21, 3,
%e A286245    67, 23, 12, 19, 5, 27, 3, 36, 10, 21, 3, 78,
%e A286245    79, 23, 12, 19, 5, 27, 3, 36, 10, 21, 3, 78, 3,
%e A286245    92, 30, 12, 19, 5, 27, 5, 36, 10, 21, 3, 78, 3, 21,
%e A286245   106, 30, 17, 19, 8, 27, 5, 36, 10, 21, 3, 78, 3, 21, 21
%o A286245 (Scheme)
%o A286245 (define (A286245 n) (A286245bi (A002260 n) (A004736 n)))
%o A286245 (define (A286245bi row col) (let ((a (A046523 row)) (b (quotient (+ row col -1) row))) (* (/ 1 2) (+ (expt (+ a b) 2) (- a) (- (* 3 b)) 2))))
%o A286245 (Python)
%o A286245 from sympy import factorint
%o A286245 def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2
%o A286245 def P(n):
%o A286245     f = factorint(n)
%o A286245     return sorted([f[i] for i in f])
%o A286245 def a046523(n):
%o A286245     x=1
%o A286245     while True:
%o A286245         if P(n) == P(x): return x
%o A286245         else: x+=1
%o A286245 def t(n, k): return T(a046523(k), int(n//k))
%o A286245 for n in range(1, 21): print([t(n, k) for k in range(1, n + 1)]) # _Indranil Ghosh_, May 09 2017
%Y A286245 Transpose: A286244.
%Y A286245 Cf. A000027, A046523, A286156.
%Y A286245 Cf. A286247 (same triangle but with zeros in positions where k does not divide n), A286235.
%K A286245 nonn,tabl
%O A286245 1,2
%A A286245 _Antti Karttunen_, May 06 2017