login
The number of divisors of the largest unitary divisor of n that is a term of A138302.
4

%I #7 Nov 10 2023 09:35:42

%S 1,2,2,3,2,4,2,1,3,4,2,6,2,4,4,5,2,6,2,6,4,4,2,2,3,4,1,6,2,8,2,1,4,4,

%T 4,9,2,4,4,2,2,8,2,6,6,4,2,10,3,6,4,6,2,2,4,2,4,4,2,12,2,4,6,1,4,8,2,

%U 6,4,8,2,3,2,4,6,6,4,8,2,10,5,4,2,12,4,4

%N The number of divisors of the largest unitary divisor of n that is a term of A138302.

%H Amiram Eldar, <a href="/A367170/b367170.txt">Table of n, a(n) for n = 1..10000</a>

%F Multiplicative with a(p^e) = A048298(e) + 1.

%F a(n) = A000005(A367168(n)).

%F a(n) <= A000005(n), with equality if and only if n is in A138302.

%t f[p_, e_] := If[e == 2^IntegerExponent[e, 2], e+1, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]

%o (PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 2] == 1 << valuation(f[i, 2], 2), f[i, 2] + 1, 1));}

%Y Cf. A000005, A048298, A138302, A367168, A367169, A367171.

%Y Similar sequences: A365401, A365402.

%K nonn,easy,mult

%O 1,2

%A _Amiram Eldar_, Nov 07 2023