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.

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.

This page as a plain text file.
%I A297934 #26 Jan 24 2018 07:59:04
%S A297934 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,
%T A297934 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,
%U A297934 2,0,2,7,2,0,2,0,2,0,0,3,0,5,3,0,0,3,5
%N 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.
%C A297934 n is prime (A000040) if and only if Sum_{i=2..n-1} T(n, i) = 0.
%C A297934 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).
%H A297934 Michael De Vlieger, <a href="/A297934/b297934.txt">Table of n, a(n) for n = 3..11028</a> (rows 3 <= n <= 150).
%e A297934 ============================================================
%e A297934 . n \ k |  2   3   4   5   6   7   8   9  10  11  12  13  14
%e A297934 --------|---------------------------------------------------
%e A297934 .   3   |  0
%e A297934 .   4   |  2   0
%e A297934 .   5   |  0   0   0
%e A297934 .   6   |  2   3   2   0
%e A297934 .   7   |  0   0   0   0   0
%e A297934 .   8   |  2   0   2   0   2   0
%e A297934 .   9   |  0   3   0   0   3   0   0
%e A297934 .  10   |  2   0   2   5   2   0   2   0
%e A297934 .  11   |  0   0   0   0   0   0   0   0   0
%e A297934 .  12   |  2   3   2   0   2   0   2   3   2   0
%e A297934 .  13   |  0   0   0   0   0   0   0   0   0   0   0
%e A297934 .  14   |  2   0   2   0   2   7   2   0   2   0   2   0
%e A297934 .  15   |  0   3   0   5   3   0   0   3   5   0   3   0   0
%t A297934 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 *)
%o A297934 (PARI) t(n, k) = if(gcd(n, k) > 1, my(f=factor(n)[, 1]~, g=factor(k)[, 1]~); return(vecmin(setintersect(f, g)))); 0
%o A297934 trianglerows(n) = for(x=3, n+2, for(y=2, x-1, print1(t(x, y), ", ")); print(""))
%o A297934 trianglerows(13) \\ print upper 13 rows of triangle
%Y A297934 Cf. A000040, A025475, A081520.
%K A297934 nonn,tabl,easy
%O A297934 3,2
%A A297934 _Felix Fröhlich_, Jan 09 2018
%E A297934 Value of T(12, 6) and PARI program corrected by _Felix Fröhlich_, Jan 23 2018