login
a(n) = Sum_{d|n, d odd} (n/d)^d.
3

%I #15 Jul 09 2023 12:13:42

%S 1,2,4,4,6,14,8,8,37,42,12,76,14,142,384,16,18,746,20,1044,2552,2070,

%T 24,536,3151,8218,20440,16412,30,41574,32,32,178512,131106,94968,

%U 263908,38,524326,1596560,32808,42,2379874,44,4194348,16364502,8388654,48,4144,823593,33654482

%N a(n) = Sum_{d|n, d odd} (n/d)^d.

%H Seiichi Manyama, <a href="/A333823/b333823.txt">Table of n, a(n) for n = 1..5000</a>

%F G.f.: Sum_{k>=1} k * x^k / (1 - k^2*x^(2*k)).

%F a(2^n) = 2^n. - _Seiichi Manyama_, Apr 07 2020

%t Table[DivisorSum[n, (n/#)^# &, OddQ[#] &], {n, 50}]

%t nmax = 50; CoefficientList[Series[Sum[k x^k/(1 - k^2 x^(2 k)), {k, 1, nmax}], {x, 0, nmax}], x] // Rest

%o (PARI) a(n) = sumdiv(n, d, if ((d)%2, (n/d)^d)); \\ _Michel Marcus_, Apr 07 2020

%o (Python)

%o from sympy import divisors

%o def A333823(n): return sum((n//d)**d for d in divisors(n>>(~n & n-1).bit_length(),generator=True)) # _Chai Wah Wu_, Jul 09 2023

%Y Cf. A055225, A333824.

%K nonn

%O 1,2

%A _Ilya Gutkovskiy_, Apr 06 2020