|
|
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.
|
|
2
|
|
|
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
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
3,2
|
|
COMMENTS
|
n is prime (A000040) if and only if Sum_{i=2..n-1} T(n, i) = 0.
n is a prime power (A025475) if and only if for any two x, y such that both T(n, x), T(n, y) > 0 also T(n, x) = T(n, y).
|
|
LINKS
|
|
|
EXAMPLE
|
============================================================
. 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
|
|
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 *)
|
|
PROG
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Value of T(12, 6) and PARI program corrected by Felix Fröhlich, Jan 23 2018
|
|
STATUS
|
approved
|
|
|
|