A384245 Triangle read by rows: T(n, k) for 1 <= k <= n is the largest divisor of k that is an infinitary divisor of n.
1, 1, 2, 1, 1, 3, 1, 1, 1, 4, 1, 1, 1, 1, 5, 1, 2, 3, 2, 1, 6, 1, 1, 1, 1, 1, 1, 7, 1, 2, 1, 4, 1, 2, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 3, 4, 1, 3, 1, 4, 3, 1, 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13
Offset: 1
Examples
Triangle begins: 1 1, 2 1, 1, 3 1, 1, 1, 4 1, 1, 1, 1, 5 1, 2, 3, 2, 1, 6 1, 1, 1, 1, 1, 1, 7 1, 2, 1, 4, 1, 2, 1, 8 1, 1, 1, 1, 1, 1, 1, 1, 9 1, 2, 1, 2, 5, 2, 1, 2, 1, 10
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10153 (first 142 rows flattened)
Programs
-
Mathematica
infdivs[n_] := If[n == 1, {1}, Sort@ Flatten@ Outer[Times, Sequence @@ (FactorInteger[n] /. {p_, m_Integer} :> p^Select[Range[0, m], BitOr[m, #] == m &])]]; (* Michael De Vlieger at A077609 *) T[n_, k_] := Max[Intersection[infdivs[n], Divisors[k]]]; Table[T[n, k], {n, 1, 13}, {k, 1, n}] // Flatten
-
PARI
isidiv(d, f) = {if (d==1, return (1)); for (k=1, #f~, bne = binary(f[k, 2]); bde = binary(valuation(d, f[k, 1])); if (#bde < #bne, bde = concat(vector(#bne-#bde), bde)); for (j=1, #bne, if (! bne[j] && bde[j], return (0)); ); ); return (1); } infdivs(n) = {my(f = factor(n), d = divisors(f), idiv = []); for (k=1, #d, if (isidiv(d[k], f), idiv = concat(idiv, d[k])); ); idiv; } \\ Michel Marcus at A077609 T(n, k) = vecmax(setintersect(infdivs(n), divisors(k)));
Comments