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.

A384446 Triangle read by rows: T(n, k) = |gcd(n, k) - k|.

This page as a plain text file.
%I A384446 #11 May 30 2025 03:37:45
%S A384446 0,1,0,2,0,0,3,0,1,0,4,0,0,2,0,5,0,1,2,3,0,6,0,0,0,2,4,0,7,0,1,2,3,4,
%T A384446 5,0,8,0,0,2,0,4,4,6,0,9,0,1,0,3,4,3,6,7,0,10,0,0,2,2,0,4,6,6,8,0,11,
%U A384446 0,1,2,3,4,5,6,7,8,9,0,12,0,0,0,0,4,0,6,4,6,8,10,0
%N A384446 Triangle read by rows: T(n, k) = |gcd(n, k) - k|.
%C A384446 T(n, k) can be understood as a measure of the divisibility of n by k.
%F A384446 T(n, 0) = n.
%F A384446 T(n, k) = 0 if k divides n, in particular T(n, 1) = T(n, n) = 0.
%F A384446 T(n, k) = |A002262(n, k) - A109004(n, k)|.
%e A384446 Triangle starts:
%e A384446   [0] [0]
%e A384446   [1] [1, 0]
%e A384446   [2] [2, 0, 0]
%e A384446   [3] [3, 0, 1, 0]
%e A384446   [4] [4, 0, 0, 2, 0]
%e A384446   [5] [5, 0, 1, 2, 3, 0]
%e A384446   [6] [6, 0, 0, 0, 2, 4, 0]
%e A384446   [7] [7, 0, 1, 2, 3, 4, 5, 0]
%e A384446   [8] [8, 0, 0, 2, 0, 4, 4, 6, 0]
%e A384446   [9] [9, 0, 1, 0, 3, 4, 3, 6, 7, 0]
%o A384446 (Python)
%o A384446 from math import gcd
%o A384446 print([abs(gcd(n, k) - k) for n in range(13) for k in range(n + 1)])
%Y A384446 Cf. A002262, A109004, A372727.
%K A384446 nonn,tabl
%O A384446 0,4
%A A384446 _Peter Luschny_, May 29 2025