login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Michael De Vlieger, Table of n, a(n) for n = 3..11028 (rows 3 <= n <= 150).
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
Sequence in context: A343633 A174469 A357724 * A112166 A112167 A230571
KEYWORD
nonn,tabl,easy
AUTHOR
Felix Fröhlich, Jan 09 2018
EXTENSIONS
Value of T(12, 6) and PARI program corrected by Felix Fröhlich, Jan 23 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)