A286239 Triangular table: T(n,k) = 0 if k does not divide n, otherwise T(n,k) = P(A000010(n/k), k), where P is sequence A000027 used as a pairing function N x N -> N. Table is read by rows as T(1,1), T(2,1), T(2,2), etc.
1, 1, 2, 3, 0, 4, 3, 2, 0, 7, 10, 0, 0, 0, 11, 3, 5, 4, 0, 0, 16, 21, 0, 0, 0, 0, 0, 22, 10, 5, 0, 7, 0, 0, 0, 29, 21, 0, 8, 0, 0, 0, 0, 0, 37, 10, 14, 0, 0, 11, 0, 0, 0, 0, 46, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 10, 5, 8, 12, 0, 16, 0, 0, 0, 0, 0, 67, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 21, 27, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 92, 36, 0, 19, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106
Offset: 1
Examples
The first fifteen rows of triangle: 1, 1, 2, 3, 0, 4, 3, 2, 0, 7, 10, 0, 0, 0, 11, 3, 5, 4, 0, 0, 16, 21, 0, 0, 0, 0, 0, 22, 10, 5, 0, 7, 0, 0, 0, 29, 21, 0, 8, 0, 0, 0, 0, 0, 37, 10, 14, 0, 0, 11, 0, 0, 0, 0, 46, 55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 10, 5, 8, 12, 0, 16, 0, 0, 0, 0, 0, 67, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 21, 27, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 92, 36, 0, 19, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106 ------------------------------------------------------------- Note how triangle A286237 contains on each row the same numbers in the same "divisibility-allotted" positions, but in reverse order.
Links
Crossrefs
Programs
-
Python
from sympy import totient def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2 def t(n, k): return 0 if n%k!=0 else T(totient(n//k), k) for n in range(1, 21): print([t(n, k) for k in range(1, n + 1)]) # Indranil Ghosh, May 09 2017
-
Scheme
(define (A286239 n) (A286239tr (A002024 n) (A002260 n))) (define (A286239tr n k) (if (not (zero? (modulo n k))) 0 (let ((a (A000010 (/ n k))) (b k)) (* (/ 1 2) (+ (expt (+ a b) 2) (- a) (- (* 3 b)) 2)))))
Comments