login
a(n) = A292591(A245612(n)).
9

%I #7 Sep 23 2017 19:14:38

%S 0,1,2,2,4,5,4,5,8,8,10,11,8,8,10,10,16,17,16,17,20,20,22,23,16,17,16,

%T 16,20,21,20,21,32,32,34,35,32,32,34,34,40,41,40,41,44,44,46,47,32,32,

%U 34,34,32,33,32,32,40,40,42,43,40,40,42,42,64,65,64,65,68,68,70,71,64,65,64,64,68,69,68,69,80,80,82,83,80,80,82,82,88,89,88,89

%N a(n) = A292591(A245612(n)).

%H Antti Karttunen, <a href="/A292593/b292593.txt">Table of n, a(n) for n = 0..8191</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%F a(n) + A292592(n) = n.

%t f[n_] := f[n] = Which[n == 1, 0, Mod[n, 3] == 2, Ceiling[n/3], True, (Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1] + 1)/2]; g[n_] := g[n] = If[n <= 2, n - 1, 2 g[f@ n] + Boole[Mod[n, 3] == 1]]; h[n_] := (Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] + 1)/2 &@ Transpose@ FactorInteger@ If[n == 0, 1, Prime[#] Product[Prime[m]^(Map[ Ceiling[ (Length@ # - 1)/2] &, DeleteCases[Split@ Join[Riffle[IntegerDigits[n, 2], 0], {0}], {k__} /; k == 1]][[-m]]), {m, #}] &[DigitCount[n, 2, 1]]]; Array[g@ h@ # &, 92, 0] (* _Michael De Vlieger_, Sep 22 2017 *)

%Y Cf. A245612, A292591, A292592.

%Y Differs from A292271 for the first time at n=31, where a(31) = 21, while A292271(31) = 20.

%K nonn,base

%O 0,3

%A _Antti Karttunen_, Sep 20 2017