login
Square array T(n, k) = Sum_{p prime} [v_p(n) >= v_p(k) > 0] read by antidiagonals up, where [] is the Iverson bracket and v_p is the p-adic valuation, n >= 1, k >= 1.
1

%I #19 Dec 19 2018 18:56:05

%S 0,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,0,1,

%T 0,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,2,0,0,0,1,0,0,0,

%U 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,1,0,0,1,0,0

%N Square array T(n, k) = Sum_{p prime} [v_p(n) >= v_p(k) > 0] read by antidiagonals up, where [] is the Iverson bracket and v_p is the p-adic valuation, n >= 1, k >= 1.

%C T(., k) is additive and k-periodic.

%C T(n, .) is additive and n^2-periodic.

%F T(n, k) = Sum_{p prime} [v_p(n) >= v_p(k) > 0].

%F T(n, n) = omega(n) = A001221(n) = the number of distinct primes dividing n.

%F a(n) = log_2(A319582(n)).

%e T(60, 50) = T(2^2 * 3^1 * 5^1, 2^1 * 5^2)

%e = T(2^2, 2^1) + T(3^1, 3^0) + T(5^1, 5^2)

%e = [2 >= 1 > 0] + [1 >= 0 > 0] + [1 >= 2 > 0]

%e = 1 + 0 + 0

%e = 1.

%e Array begins (zeros replaced by dots):

%e k = 1 1 1

%e n 1 2 3 4 5 6 7 8 9 0 1 2

%e = ------------------------

%e 1 | . . . . . . . . . . . .

%e 2 | . 1 . . . 1 . . . 1 . .

%e 3 | . . 1 . . 1 . . . . . 1

%e 4 | . 1 . 1 . 1 . . . 1 . 1

%e 5 | . . . . 1 . . . . 1 . .

%e 6 | . 1 1 . . 2 . . . 1 . 1

%e 7 | . . . . . . 1 . . . . .

%e 8 | . 1 . 1 . 1 . 1 . 1 . 1

%e 9 | . . 1 . . 1 . . 1 . . 1

%e 10 | . 1 . . 1 1 . . . 2 . .

%e 11 | . . . . . . . . . . 1 .

%e 12 | . 1 1 1 . 2 . . . 1 . 2

%t F[n_] := If[n == 1, {}, FactorInteger[n]]

%t V[p_] := If[KeyExistsQ[#, p], #[p], 0] &

%t PreT[n_, k_] :=

%t Module[{fn = F[n], fk = F[k], p, an = <||>, ak = <||>, w},

%t p = Union[First /@ fn, First /@ fk];

%t (an[#[[1]]] = #[[2]]) & /@ fn;

%t (ak[#[[1]]] = #[[2]]) & /@ fk;

%t w = ({V[#][an], V[#][ak]}) & /@ p;

%t Select[w, (#[[1]] >= #[[2]] > 0) &]

%t ]

%t T[n_, k_] := Length[PreT[n, k]]

%t A004736[n_] := Binomial[Floor[3/2 + Sqrt[2*n]], 2] - n + 1

%t A002260[n_] := n - Binomial[Floor[1/2 + Sqrt[2*n]], 2]

%t a[n_] := T[A004736[n], A002260[n]]

%t Table[a[n], {n, 1, 90}]

%o (PARI) maxp(n) = if (n==1, 1, vecmax(factor(n)[,1]));

%o T(n, k) = {pmax = max(maxp(n), maxp(k)); x = 0; forprime(p=2, pmax, if ((valuation(n, p) >= valuation(k, p)) && (valuation(k, p) > 0), x ++);); x;} \\ _Michel Marcus_, Oct 28 2018

%Y Cf. A319582 (a multiplicative variant).

%Y Cf. A001221.

%K nonn,tabl

%O 1,61

%A _Luc Rousseau_, Sep 23 2018