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.

A384246 Triangle in which the n-th row gives the numbers from 1 to n whose largest divisor that is an infinitary divisor of n is 1.

This page as a plain text file.
%I A384246 #7 May 27 2025 01:17:33
%S A384246 1,1,1,2,1,2,3,1,2,3,4,1,5,1,2,3,4,5,6,1,3,5,7,1,2,3,4,5,6,7,8,1,3,7,
%T A384246 9,1,2,3,4,5,6,7,8,9,10,1,2,5,7,10,11,1,2,3,4,5,6,7,8,9,10,11,12,1,3,
%U A384246 5,9,11,13,1,2,4,7,8,11,13,14,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
%N A384246 Triangle in which the n-th row gives the numbers from 1 to n whose largest divisor that is an infinitary divisor of n is 1.
%H A384246 Amiram Eldar, <a href="/A384246/b384246.txt">Table of n, a(n) for n = 1..10276</a> (first 175 rows flattened)
%e A384246 Triangle begins:
%e A384246   1
%e A384246   1
%e A384246   1, 2
%e A384246   1, 2, 3
%e A384246   1, 2, 3, 4
%e A384246   1, 5
%e A384246   1, 2, 3, 4, 5, 6
%e A384246   1, 3, 5, 7
%e A384246   1, 2, 3, 4, 5, 6, 7, 8
%e A384246   1, 3, 7, 9
%e A384246   1, 2, 3, 4, 5, 6, 7, 8, 9, 10
%e A384246   1, 2, 5, 7, 10, 11
%e A384246   1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
%e A384246   1, 3, 5, 9, 11, 13
%e A384246   1, 2, 4, 7, 8, 11, 13, 14
%t A384246 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 A384246 infGCD[n_, k_] := Max[Intersection[infdivs[n], Divisors[k]]];
%t A384246 row[n_] := Select[Range[n], infGCD[n, #] == 1 &]; Array[row, 16] // Flatten
%o A384246 (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); }
%o A384246 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
%o A384246 infgcd(n, k) = vecmax(setintersect(infdivs(n), divisors(k)));
%o A384246 row(n) = select(x -> infgcd(n, x) == 1, vector(n, i, i));
%Y A384246 Cf. A064379, A384046, A384245, A384247 (row lengths), A384248 (row sums).
%K A384246 nonn,tabf,easy
%O A384246 1,4
%A A384246 _Amiram Eldar_, May 23 2025