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.

A286236 Square array A(n,k) = P(A000010(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 A286236 #29 Jun 12 2025 10:17:05
%S A286236 1,1,2,3,0,4,3,0,2,7,10,0,0,0,11,3,0,0,5,4,16,21,0,0,0,0,0,22,10,0,0,
%T A286236 0,5,0,7,29,21,0,0,0,0,0,8,0,37,10,0,0,0,0,14,0,0,11,46,55,0,0,0,0,0,
%U A286236 0,0,0,0,56,10,0,0,0,0,0,5,0,8,12,16,67,78,0,0,0,0,0,0,0,0,0,0,0,79,21,0,0,0,0,0,0,27,0,0,0,0,22,92,36,0,0,0,0,0,0,0,0,0,19,0,17,0,106
%N A286236 Square array A(n,k) = P(A000010(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.
%C A286236 This is transpose of A286237, see comments there.
%H A286236 Antti Karttunen, <a href="/A286236/b286236.txt">Table of n, a(n) for n = 1..10585; the first 145 rows of triangle/antidiagonals of array</a>
%F A286236 T(n,k) = A113998(n,k) * A286234(n,k).
%e A286236 The top left 12 X 12 corner of the array:
%e A286236    1,  1,  3,  3, 10, 3, 21, 10, 21, 10, 55, 10
%e A286236    2,  0,  0,  0,  0, 0,  0,  0,  0,  0,  0,  0
%e A286236    4,  2,  0,  0,  0, 0,  0,  0,  0,  0,  0,  0
%e A286236    7,  0,  5,  0,  0, 0,  0,  0,  0,  0,  0,  0
%e A286236   11,  4,  0,  5,  0, 0,  0,  0,  0,  0,  0,  0
%e A286236   16,  0,  0,  0, 14, 0,  0,  0,  0,  0,  0,  0
%e A286236   22,  7,  8,  0,  0, 5,  0,  0,  0,  0,  0,  0
%e A286236   29,  0,  0,  0,  0, 0, 27,  0,  0,  0,  0,  0
%e A286236   37, 11,  0,  8,  0, 0,  0, 14,  0,  0,  0,  0
%e A286236   46,  0, 12,  0,  0, 0,  0,  0, 27,  0,  0,  0
%e A286236   56, 16,  0,  0, 19, 0,  0,  0,  0, 14,  0,  0
%e A286236   67,  0,  0,  0,  0, 0,  0,  0,  0,  0, 65,  0
%e A286236 The first 15 rows when viewed as a triangle:
%e A286236    1,
%e A286236    1, 2,
%e A286236    3, 0, 4,
%e A286236    3, 0, 2, 7,
%e A286236   10, 0, 0, 0, 11,
%e A286236    3, 0, 0, 5,  4, 16,
%e A286236   21, 0, 0, 0,  0,  0, 22,
%e A286236   10, 0, 0, 0,  5,  0,  7, 29,
%e A286236   21, 0, 0, 0,  0,  0,  8,  0, 37,
%e A286236   10, 0, 0, 0,  0, 14,  0,  0, 11, 46,
%e A286236   55, 0, 0, 0,  0,  0,  0,  0,  0,  0, 56,
%e A286236   10, 0, 0, 0,  0,  0,  5,  0,  8, 12, 16, 67,
%e A286236   78, 0, 0, 0,  0,  0,  0,  0,  0,  0,  0,  0, 79,
%e A286236   21, 0, 0, 0,  0,  0,  0, 27,  0,  0,  0,  0, 22, 92,
%e A286236   36, 0, 0, 0,  0,  0,  0,  0,  0,  0, 19,  0, 17,  0, 106
%t A286236 T[n_, m_] := ((n + m)^2 - n - 3*m + 2)/2
%t A286236 t[n_, k_] := If[Mod[n, k] != 0, 0, T[EulerPhi[k], n/k]]
%t A286236 Table[Reverse[t[n, #] & /@ Range[n]], {n, 1, 20}] (* _David Radcliffe_, Jun 12 2025 *)
%o A286236 (Scheme)
%o A286236 (define (A286236 n) (A286236bi (A002260 n) (A004736 n)))
%o A286236 (define (A286236bi row col) (if (not (zero? (modulo (+ row col -1) col))) 0 (let ((a (A000010 col)) (b (/ (+ row col -1) col))) (* (/ 1 2) (+ (expt (+ a b) 2) (- a) (- (* 3 b)) 2)))))
%o A286236 ;; Alternatively, with triangular indexing:
%o A286236 (define (A286236 n) (A286236tr (A002024 n) (A002260 n)))
%o A286236 (define (A286236tr n k) (A286236bi k (+ 1 (- n k))))
%o A286236 (Python)
%o A286236 from sympy import totient
%o A286236 def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2
%o A286236 def t(n, k): return 0 if n%k!=0 else T(totient(k), n//k)
%o A286236 for n in range(1, 21): print([t(n, k) for k in range(1, n + 1)][::-1]) # _Indranil Ghosh_, May 10 2017
%Y A286236 Transpose: A286237.
%Y A286236 Cf. A000010, A000027, A113998, A286156, A286234, A286246.
%K A286236 nonn,tabl
%O A286236 1,3
%A A286236 _Antti Karttunen_, May 05 2017