A051194 Triangular array T read by rows: T(n,k) = number of positive integers that divide both n and k.
1, 1, 2, 1, 1, 2, 1, 2, 1, 3, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 4, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 2, 1, 4, 1, 1, 2, 1, 1, 2, 1, 1, 3, 1, 2, 1, 2, 2, 2, 1, 2, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 3, 1, 4, 1, 3, 2, 2, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2
Offset: 1
Examples
Triangle begins: {1}; {1,2}; {1,1,2}; {1,2,1,3}; {1,1,1,1,2}; {1,2,2,2,1,4}; ...
Links
- Math StackExchange, A question on the discrete Fourier Transform of some function
Crossrefs
Programs
-
Mathematica
T[ n_, k_] := Length[Intersection[Divisors @ If[n == 0, 1, n], Divisors @ If[k == 0, 1, k]]] (* Michael Somos, Jul 18 2011 *)
-
PARI
{T(n, k) = sum( i=1, min( abs(n), abs(k)),(n%i == 0) && (k%i == 0))} /* Michael Somos, Jul 18 2011 */
Formula
T(n,k) = T(k,n) = T(-n,k) = T(n,-k) = T(n,n+k) = T(n+k,k). - Michael Somos, Jul 18 2011
Comments