login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A151787 a(1)=1; for n > 1, a(n)=3*2^{wt(n-1)-1}. 8

%I #23 Jun 23 2021 05:08:01

%S 1,3,3,6,3,6,6,12,3,6,6,12,6,12,12,24,3,6,6,12,6,12,12,24,6,12,12,24,

%T 12,24,24,48,3,6,6,12,6,12,12,24,6,12,12,24,12,24,24,48,6,12,12,24,12,

%U 24,24,48,12,24,24,48,24,48,48,96,3,6,6,12,6,12,12,24,6,12,12,24,12,24,24,48

%N a(1)=1; for n > 1, a(n)=3*2^{wt(n-1)-1}.

%C wt(n) is the Hamming weight = binary weight of n (A000120).

%H Robert Israel, <a href="/A151787/b151787.txt">Table of n, a(n) for n = 1..10000</a>

%F From _Robert Israel_, Feb 27 2018: (Start)

%F For n > 1, a(2*n)=2*a(n).

%F a(2*n+1)=a(n+1).

%F G.f. g(x) satisfies g(x) = (2+1/x)*g(x^2) + x^2. (End)

%F a(n) = 3*A001316(n-1)/2 for n >= 2. - _Georg Fischer_, Jun 23 2021

%p wt:= n -> convert(convert(n,base,2),`+`):

%p [1, seq(3*2^(wt(n-1)-1),n=2..100)]; # _Robert Israel_, Feb 27 2018

%t a[n_] := If[n == 1, 1, 3*2^(Total[IntegerDigits[n-1, 2]]-1)];

%t Array[a, 100] (* _Jean-François Alcover_, Mar 27 2019 *)

%o (PARI) a(n) = if (n==1, 1, 3*2^(hammingweight(n-1)-1)); \\ _Michel Marcus_, Feb 27 2018

%Y Cf. A000120, A001316, A147582, A151779.

%K nonn

%O 1,2

%A _N. J. A. Sloane_, Jun 25 2009

%E Definition corrected by _Omar E. Pol_, Mar 03 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 23:15 EDT 2024. Contains 371798 sequences. (Running on oeis4.)