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.

A286246 Square array A(n,k) = P(A046523(k), (n+k-1)/k) if k divides (n+k-1), 0 otherwise, 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.

This page as a plain text file.
%I A286246 #23 Jun 10 2025 13:53:41
%S A286246 1,3,2,3,0,4,10,0,5,7,3,0,0,0,11,21,0,0,5,8,16,3,0,0,0,0,0,22,36,0,0,
%T A286246 0,14,0,12,29,10,0,0,0,0,0,8,0,37,21,0,0,0,0,5,0,0,17,46,3,0,0,0,0,0,
%U A286246 0,0,0,0,56,78,0,0,0,0,0,27,0,19,12,23,67,3,0,0,0,0,0,0,0,0,0,0,0,79,21,0,0,0,0,0,0,5,0,0,0,0,30,92,21,0,0,0,0,0,0,0,0,0,8,0,17,0,106
%N A286246 Square array A(n,k) = P(A046523(k), (n+k-1)/k) if k divides (n+k-1), 0 otherwise, 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 A286246 Antti Karttunen, <a href="/A286246/b286246.txt">Table of n, a(n) for n = 1..10585; the first 145 rows of triangle/antidiagonals of array</a>
%H A286246 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing Function</a>
%F A286246 T(n,k) = A113998(n,k) * A286244(n,k).
%e A286246 The top left 12 X 12 corner of the array:
%e A286246    1,  3,  3, 10,  3, 21,  3, 36, 10, 21,  3, 78
%e A286246    2,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
%e A286246    4,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
%e A286246    7,  0,  5,  0,  0,  0,  0,  0,  0,  0,  0,  0
%e A286246   11,  8,  0, 14,  0,  0,  0,  0,  0,  0,  0,  0
%e A286246   16,  0,  0,  0,  5,  0,  0,  0,  0,  0,  0,  0
%e A286246   22, 12,  8,  0,  0, 27,  0,  0,  0,  0,  0,  0
%e A286246   29,  0,  0,  0,  0,  0,  5,  0,  0,  0,  0,  0
%e A286246   37, 17,  0, 19,  0,  0,  0, 44,  0,  0,  0,  0
%e A286246   46,  0, 12,  0,  0,  0,  0,  0, 14,  0,  0,  0
%e A286246   56, 23,  0,  0,  8,  0,  0,  0,  0, 27,  0,  0
%e A286246   67,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0
%e A286246 The first fifteen rows of triangle:
%e A286246    1,
%e A286246    3, 2,
%e A286246    3, 0, 4,
%e A286246   10, 0, 5, 7,
%e A286246    3, 0, 0, 0, 11,
%e A286246   21, 0, 0, 5,  8, 16,
%e A286246    3, 0, 0, 0,  0,  0, 22,
%e A286246   36, 0, 0, 0, 14,  0, 12, 29,
%e A286246   10, 0, 0, 0,  0,  0,  8,  0, 37,
%e A286246   21, 0, 0, 0,  0,  5,  0,  0, 17, 46,
%e A286246    3, 0, 0, 0,  0,  0,  0,  0,  0,  0, 56,
%e A286246   78, 0, 0, 0,  0,  0, 27,  0, 19, 12, 23, 67,
%e A286246    3, 0, 0, 0,  0,  0,  0,  0,  0,  0,  0,  0, 79,
%e A286246   21, 0, 0, 0,  0,  0,  0,  5,  0,  0,  0,  0, 30, 92,
%e A286246   21, 0, 0, 0,  0,  0,  0,  0,  0,  0,  8,  0, 17,  0, 106
%o A286246 (Scheme)
%o A286246 (define (A286246 n) (A286246bi (A002260 n) (A004736 n)))
%o A286246 (define (A286246bi row col) (if (not (zero? (modulo (+ row col -1) col))) 0 (let ((a (A046523 col)) (b (/ (+ row col -1) col))) (* (/ 1 2) (+ (expt (+ a b) 2) (- a) (- (* 3 b)) 2)))))
%o A286246 ;; Alternatively, with triangular indexing:
%o A286246 (define (A286246 n) (A286246tr (A002024 n) (A002260 n)))
%o A286246 (define (A286246tr n k) (A286246bi k (+ 1 (- n k))))
%o A286246 (Python)
%o A286246 from sympy import factorint
%o A286246 def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2
%o A286246 def P(n):
%o A286246     f = factorint(n)
%o A286246     return sorted([f[i] for i in f])
%o A286246 def a046523(n):
%o A286246     x=1
%o A286246     while True:
%o A286246         if P(n) == P(x): return x
%o A286246         else: x+=1
%o A286246 def A(n, k): return 0 if (n + k - 1)%k!=0 else T(a046523(k), (n + k - 1)//k)
%o A286246 for n in range(1, 21): print([A(k, n - k + 1) for k in range(1, n + 1)]) # _Indranil Ghosh_, May 09 2017
%Y A286246 Transpose: A286247.
%Y A286246 Cf. A000027, A046523, A113998, A286156, A286244, A286236.
%K A286246 nonn,tabl
%O A286246 1,2
%A A286246 _Antti Karttunen_, May 06 2017