A143111 Triangle read by rows, T(n,k) = largest proper divisor of A127093(n,k) where (largest proper divisor)(n) = A032742(n) if n>0 and 0 if n=0.
1, 1, 1, 1, 0, 1, 1, 1, 0, 2, 1, 0, 0, 0, 1, 1, 1, 1, 0, 0, 3, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 2, 0, 0, 0, 4, 1, 0, 1, 0, 0, 0, 0, 0, 3, 1, 1, 0, 0, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 0, 3, 0, 0, 0, 0, 0, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 7
Offset: 1
Examples
First few rows of the triangle: 1; 1, 1; 1, 0, 1; 1, 1, 0, 2; 1, 0, 0, 0, 1; 1, 1, 1, 0, 0, 3; 1, 0, 0, 0, 0, 0, 1; 1, 1, 0, 2, 0, 0, 0, 4; 1, 0, 1, 0, 0, 0, 0, 0, 3; 1, 1, 0, 0, 1, 0, 0, 0, 0, 5; 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1; 1, 1, 1, 2, 0, 3, 0, 0, 0, 0, 0, 6; ... Example: The divisors of 12 are shown in row 12 of triangle A127093: (1, 2, 3, 4, 0, 6, 0, 0, 0, 0, 0, 12); and the largest proper divisors of those terms are: (1, 1, 1, 2, 0, 3, 0, 0, 0, 0, 0, 6) where the first 12 terms of A031742 (largest proper divisors of n) are: (1, 1, 1, 2, 1, 3, 1, 4, 3, 5, 1, 6).
Programs
-
Mathematica
Table[If[# > 1, Divisors[#][[-2]], #] &[k*Boole[Divisible[n, k]]], {n, 14}, {k, n}] (* Michael De Vlieger, Dec 19 2022 *)
-
PARI
t(n,k) = k * 0^(n % k); \\ A127093 f(n) = if(n<=1, n, n/factor(n)[1, 1]); \\ A032742 T(n,k) = f(t(n,k)); row(n) = vector(n, k, T(n,k)); \\ Michel Marcus, Dec 19 2022
-
PARI
T1(n,k) = 0^(n % k); \\ A051731 a2(n) = if(n==1, 1, n/factor(n)[1, 1]); \\ A032742 tabl(nn) = my(m1 = matrix(nn,nn,n,k,T1(n,k)), v2 = vector(nn,n,a2(n))); m1*matdiagonal(v2); \\ Michel Marcus, Dec 19 2022
Extensions
Typo in data corrected and new name from existing formula by Michel Marcus, Dec 19 2022
Comments