login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Base-2 expansion of a(n) encodes the steps where numbers of the form 3k+2 are encountered when map x -> A253889(x) is iterated down to 1, starting from x=n.
6

%I #14 Sep 18 2017 09:23:32

%S 0,1,0,2,3,0,4,1,2,14,5,12,6,7,8,2,1,0,0,9,26,22,3,20,6,5,16,10,29,10,

%T 4,11,30,2,25,60,56,13,28,54,15,48,24,17,44,8,5,12,38,3,30,26,1,24,20,

%U 1,18,6,19,62,14,53,4,14,45,0,42,7,124,118,41,50,58,13,116,106,11,40,104,33,32,98,21,92,6,59,88,18,21,82,76,9,34,36,23,74

%N Base-2 expansion of a(n) encodes the steps where numbers of the form 3k+2 are encountered when map x -> A253889(x) is iterated down to 1, starting from x=n.

%H Antti Karttunen, <a href="/A292246/b292246.txt">Table of n, a(n) for n = 1..16384</a>

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

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%F a(1) = 0; for n > 1, a(n) = 2*a(A253889(n)) + floor((n mod 3)/2).

%F a(n) = A289814(A292243(n)).

%F A000120(a(n)) = A254045(n).

%F a(n) AND A292244(n) = a(n) AND A292245(n) = 0, where AND is a bitwise-AND (A004198).

%e For n = 2, the starting value is of the form 3k+2, after which follows A253889(3) = 1, the end point of iteration, which is not, thus a(2) = 1*(2^0) = 1.

%e For n = 4, the starting value is not of the form 3k+2, while A253889(4) = 2 is, thus a(4) = 0*(2^0) + 1*(2^1) = 2.

%t f[n_] := Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1]; g[n_] := (Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] + 1)/2 &@ Transpose@ FactorInteger@ n; Map[FromDigits[#, 2] &[IntegerDigits[#, 3] /. d_ /; d > 0 :> d - 1] &, Array[a, 96]] (* _Michael De Vlieger_, Sep 16 2017 *)

%o (Scheme, with memoization-macro definec)

%o (definec (A292246 n) (if (= 1 n) 0 (+ (floor->exact (/ (modulo n 3) 2)) (* 2 (A292246 (A253889 n))))))

%Y Cf. A064216, A253889, A254045, A289814, A292243, A292244, A292245.

%Y Cf. also A291759.

%K nonn,base

%O 1,4

%A _Antti Karttunen_, Sep 15 2017