%I #41 Jun 20 2024 02:34:04
%S 1,1,2,1,3,1,2,4,1,5,1,2,3,4,6,1,7,1,2,4,8,1,3,9,1,2,4,5,8,10,1,11,1,
%T 2,3,4,6,8,9,12,1,13,1,2,4,7,8,14,1,3,5,9,15,1,2,4,8,16,1,17,1,2,3,4,
%U 6,8,9,12,16,18,1,19,1,2,4,5,8,10,16,20,1,3,7,9,21,1,2,4,8,11,16,22,1,23
%N Irregular triangle in which row n contains the numbers <= n whose prime factors are a subset of prime factors of n.
%C Row n begins with 1, ends with n, and has A010846(n) terms.
%C From _Michael De Vlieger_, Jul 08 2014: (Start)
%C Prime p has {1, p} and A010846(p) = 2.
%C Prime power p^e has {1, p, ..., p^e} and A010846(p^e) = A000005(p^e) = e + 1.
%C Composite c that are not prime powers have A010846(c) = A000005(c) + A243822(c), where A243822(c) is nonzero positive, since the minimum prime divisor p of c produces at least one semidivisor (e.g., p^2 < c). Thus these have the set of divisors of c and at least one semidivisor p^2. For squareful c that are not prime powers, p^2 may divide c, but p^3 does not. The minimum squareful c = 12, 2^3 does not divide 12 yet is less than 12 and is a product of the minimum prime divisor of 12. All other even squareful c admit a power of 2 that does not divide c, since there must be another prime divisor q > 2. (end)
%C Numbers 1 <= k <= n such that (floor(n^k/k) - floor((n^k - 1)/k)) = 1. - _Michael De Vlieger_, May 26 2016
%C Numbers 1 <= k <= n such that k | n^e with e >= 0. - _Michael De Vlieger_, May 29 2018
%H T. D. Noe and Michael De Vlieger, <a href="/A162306/b162306.txt">Rows n = 1..1000 of triangle, flattened</a> (first rows n=1..200 from T. D. Noe)
%H Michael De Vlieger, <a href="/A162306/a162306.png">Plot k in row n at (x,y) = (k,-n)</a> for n = 1..2^10.
%F Union of A027750 and nonzero terms of A272618.
%F Row n of this sequence is {k <= n : rad(k) | n }, where rad = A007947. - _Michael De Vlieger_, Jun 18 2024
%e n = 6: {1, 2, 3, 4, 6}.
%e n = 7: {1, 7}.
%e n = 8: {1, 2, 4, 8}.
%e n = 9: {1, 3, 9}.
%e n = 10: {1, 2, 4, 5, 8, 10}.
%e n = 11: {1, 11}.
%e n = 12: {1, 2, 3, 4, 6, 8, 9, 12}.
%p A:= proc(n) local F, S, s, j, p;
%p F:= numtheory:-factorset(n);
%p S:= {1};
%p for p in F do
%p S:= {seq(seq(s*p^j, j=0..floor(log[p](n/s))), s=S)}
%p od;
%p S
%p end proc; map(op,[seq(A(n), n=1..100)]); # _Robert Israel_, Jul 15 2014
%t pf[n_] := If[n==1, {}, Transpose[FactorInteger[n]][[1]]]; SubsetQ[lst1_, lst2_] := Intersection[lst1,lst2]==lst1; Flatten[Table[pfn=pf[n]; Select[Range[n], SubsetQ[pf[ # ],pfn] &], {n,27}]]
%t (* Second program: *)
%t f[x_, y_ : 0] :=
%t Block[{m, n, nn, j, k, p, t, v, z},
%t n = Abs[x]; nn = If[y == 0, n, y];
%t If[n == 1, {1},
%t z = Length@
%t MapIndexed[Set[{p[#2], m[#2]}, {#1, 0}] & @@
%t {#1, First[#2]} &, FactorInteger[n][[All, 1]] ];
%t k = Times @@ Array[p[#]^m[#] &, z]; Set[{v, t}, {1, False}];
%t Union@ Reap[Do[Set[t, k > nn];
%t If[t, k /= p[v]^m[v]; m[v] = 0; v++; If[v > z, Break[]],
%t v = 1; Sow[k] ]; m[v]++; k *= p[v], {i, Infinity}] ][[-1, 1]] ] ];
%t Array[f, 120] (* _Michael De Vlieger_, Jun 18 2024 *)
%Y Cf. A007947, A010846 (number of terms in row n), A027750 (terms k that divide n), A243103 (product of terms in row n), A244974 (sum of terms in row n), A272618 (terms k that do not divide n).
%K nonn,tabf,look
%O 1,3
%A _T. D. Noe_, Jun 30 2009