login
Repeat(first 2^k numbers with no 2 in ternary representation) for k>0.
3

%I #20 Nov 19 2024 17:33:09

%S 0,1,0,1,3,4,0,1,3,4,9,10,12,13,0,1,3,4,9,10,12,13,27,28,30,31,36,37,

%T 39,40,0,1,3,4,9,10,12,13,27,28,30,31,36,37,39,40,81,82,84,85,90,91,

%U 93,94,108,109,111,112,117,118,120,121,0,1,3,4,9,10,12,13,27,28,30,31,36,37

%N Repeat(first 2^k numbers with no 2 in ternary representation) for k>0.

%C let A032924(n) = Sum(d(i)*3^i: 0<d(i)<3, 0<=i<L)

%C then .... a(n) = Sum((d(i)-1)*3^i: 0<=i<L);

%C A032924(n) = A107680(n) + a(n);

%C A081604 (a(n)) <= A081604(A107680(n)) = A081604(A032924(n)) = A000523(n+1).

%H Ruud H.G. van Tol, <a href="/A107681/b107681.txt">Table of n, a(n) for n = 1..8190</a> (12 rows).

%F a(n) = A005836(A062050(n+1)).

%e A032924(177) = A107680(177) + a(177),

%e ....... 1420 = ....... 1093 + 327,

%e .. '1221121' = ... '1111111'+ '110010',

%e ............ = . A003462(7) + A005836(51).

%o (PARI) a(n)= fromdigits(binary(n+1-1<<logint(n+1, 2)), 3); \\ _Ruud H.G. van Tol_, Nov 18 2024

%Y Cf. A000523, A005836, A003462, A007089, A032924, A062050, A081604, A107680.

%K nonn,easy,look,changed

%O 1,5

%A _Reinhard Zumkeller_, May 20 2005

%E Data corrected by _Ruud H.G. van Tol_, Nov 18 2024.