login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

The largest exponentially evil divisor of n.
7

%I #7 Oct 28 2023 03:48:35

%S 1,1,1,1,1,1,1,8,1,1,1,1,1,1,1,8,1,1,1,1,1,1,1,8,1,1,27,1,1,1,1,32,1,

%T 1,1,1,1,1,1,8,1,1,1,1,1,1,1,8,1,1,1,1,1,27,1,8,1,1,1,1,1,1,1,64,1,1,

%U 1,1,1,1,1,8,1,1,1,1,1,1,1,8,27,1,1,1,1,1

%N The largest exponentially evil divisor of n.

%C The largest divisor of n that is an exponentially evil number (A262675).

%C The number of exponentially evil divisors of n is A366902(n) and their sum is A366904(n).

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

%F Multiplicative with a(p^e) = p^max{k=1..e, k evil}.

%F a(n) <= n, with equality if and only if n is exponentially evil number (A262675).

%F a(n) >= 1, with equality if and only if n is a cubefree number (A004709).

%t maxEvil[e_] := Module[{k = e}, While[OddQ[DigitCount[k, 2, 1]], k--]; k]; f[p_, e_] := p^maxEvil[e]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]

%o (PARI) s(n) = {my(k = n); while(hammingweight(k)%2, k--); k;}

%o a(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i, 1]^s(f[i, 2]));}

%Y Cf. A004709, A262675, A366902, A366904.

%Y Similar sequences: A353897, A365683, A366905.

%K nonn,easy,mult

%O 1,8

%A _Amiram Eldar_, Oct 27 2023