A297934 Triangular array T(n, k), read by rows: least common prime factor of n and k, or 0 if n and k are coprime.
0, 2, 0, 0, 0, 0, 2, 3, 2, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 2, 0, 0, 3, 0, 0, 3, 0, 0, 2, 0, 2, 5, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 2, 0, 2, 0, 2, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 2, 7, 2, 0, 2, 0, 2, 0, 0, 3, 0, 5, 3, 0, 0, 3, 5
Offset: 3
Examples
============================================================ . n \ k | 2 3 4 5 6 7 8 9 10 11 12 13 14 --------|--------------------------------------------------- . 3 | 0 . 4 | 2 0 . 5 | 0 0 0 . 6 | 2 3 2 0 . 7 | 0 0 0 0 0 . 8 | 2 0 2 0 2 0 . 9 | 0 3 0 0 3 0 0 . 10 | 2 0 2 5 2 0 2 0 . 11 | 0 0 0 0 0 0 0 0 0 . 12 | 2 3 2 0 2 0 2 3 2 0 . 13 | 0 0 0 0 0 0 0 0 0 0 0 . 14 | 2 0 2 0 2 7 2 0 2 0 2 0 . 15 | 0 3 0 5 3 0 0 3 5 0 3 0 0
Links
- Michael De Vlieger, Table of n, a(n) for n = 3..11028 (rows 3 <= n <= 150).
Programs
-
Mathematica
Table[If[CoprimeQ[n, k], 0, First@ Intersection[FactorInteger[n][[All, 1]], FactorInteger[k][[All, 1]] ]], {n, 3, 15}, {k, 2, n - 1}] // Flatten (* Michael De Vlieger, Jan 23 2018 *)
-
PARI
t(n, k) = if(gcd(n, k) > 1, my(f=factor(n)[, 1]~, g=factor(k)[, 1]~); return(vecmin(setintersect(f, g)))); 0 trianglerows(n) = for(x=3, n+2, for(y=2, x-1, print1(t(x, y), ", ")); print("")) trianglerows(13) \\ print upper 13 rows of triangle
Extensions
Value of T(12, 6) and PARI program corrected by Felix Fröhlich, Jan 23 2018
Comments