login
The smallest divisor d of n such that n/d is an exponentially evil number (A262675).
3

%I #11 Nov 27 2023 09:49:00

%S 1,2,3,4,5,6,7,1,9,10,11,12,13,14,15,2,17,18,19,20,21,22,23,3,25,26,1,

%T 28,29,30,31,1,33,34,35,36,37,38,39,5,41,42,43,44,45,46,47,6,49,50,51,

%U 52,53,2,55,7,57,58,59,60,61,62,63,1,65,66,67,68,69,70

%N The smallest divisor d of n such that n/d is an exponentially evil number (A262675).

%C First differs from A050985 at n = 32.

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

%F a(n) = n/A366906(n).

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

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

%F Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Product_{p prime} f(1/p) = 0.84485885044273919581..., where f(x) = (1-x)*(1+Sum_{k>=1} x^(k+s(k))), s(k) is defined above for k >= 1, and s(0) = 0.

%t maxEvil[e_] := Module[{k = e}, While[OddQ[DigitCount[k, 2, 1]], k--]; k]; f[p_, e_] := p^(e - 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--); n-k; }

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

%Y Cf. A050985, A262675, A366906, A367698.

%K nonn,easy,mult,base

%O 1,2

%A _Amiram Eldar_, Nov 27 2023