login
a(n) = a(3n) = a(3n+1) = a(3n+2)/2 with a(0)=1.
9

%I #38 Jun 27 2021 04:43:17

%S 1,1,2,1,1,2,2,2,4,1,1,2,1,1,2,2,2,4,2,2,4,2,2,4,4,4,8,1,1,2,1,1,2,2,

%T 2,4,1,1,2,1,1,2,2,2,4,2,2,4,2,2,4,4,4,8,2,2,4,2,2,4,4,4,8,2,2,4,2,2,

%U 4,4,4

%N a(n) = a(3n) = a(3n+1) = a(3n+2)/2 with a(0)=1.

%C Row sums of number triangle A117944.

%C Product of the nonzero digits of (n written in base 3). - _Ilya Gutkovskiy_, Nov 15 2020

%C a(n) = 1, 2, 4, 8, 16, 32, 64 iff n is respectively in A005836, A023699, A023700, A023701, A023702, A023703, A023704. - _Bernard Schott_, Dec 04 2020

%H Felix Fröhlich, <a href="/A117592/b117592.txt">Table of n, a(n) for n = 0..10000</a> (first 2001 terms from Vincenzo Librandi)

%F a(n) = a(3n)/a(0) = a(3n+1)/a(1) = a(3n+2)/a(2).

%F a(n) = abs(A117942(n)).

%F G.f. A(x) satisfies: A(x) = (1 + x + 2*x^2) * A(x^3). - _Ilya Gutkovskiy_, Nov 15 2020

%F a(n) = 2^A081603(n). - _Kevin Ryde_, Nov 15 2020

%t Nest[ Join[#, #, 2#] &, {1}, 5] (* _Robert G. Wilson v_, Jul 27 2014 *)

%o (PARI) a(n) = 1 << hammingweight(digits(n,3)>>1); \\ _Kevin Ryde_, Nov 15 2020

%Y See A338882 for similar sequences.

%Y Cf. A081603 (log_2), A117942 (signed), A117944.

%Y Cf. A005836, A023699, A023700, A023701, A023702, A023703, A023704.

%K nonn,base

%O 0,3

%A _Paul Barry_, Apr 05 2006

%E a(0) = 1 added to the Name by _Bernard Schott_, Dec 04 2020