The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 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
 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, 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, 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 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS wt(n) is the Hamming weight = binary weight of n (A000120). LINKS Robert Israel, Table of n, a(n) for n = 1..10000 FORMULA From Robert Israel, Feb 27 2018: (Start) For n > 1, a(2*n)=2*a(n). a(2*n+1)=a(n+1). G.f. g(x) satisfies g(x) = (2+1/x)*g(x^2) + x^2. (End) MAPLE wt:= n -> convert(convert(n, base, 2), `+`): [1, seq(3*2^(wt(n-1)-1), n=2..100)]; # Robert Israel, Feb 27 2018 MATHEMATICA a[n_] := If[n == 1, 1, 3*2^(Total[IntegerDigits[n-1, 2]]-1)]; Array[a, 100] (* Jean-François Alcover, Mar 27 2019 *) PROG (PARI) a(n) = if (n==1, 1, 3*2^(hammingweight(n-1)-1)); \\ Michel Marcus, Feb 27 2018 CROSSREFS Cf. A147582, A151779, A000120. Sequence in context: A040007 A110634 A324467 * A113397 A226602 A307000 Adjacent sequences:  A151784 A151785 A151786 * A151788 A151789 A151790 KEYWORD nonn AUTHOR N. J. A. Sloane, Jun 25 2009 EXTENSIONS Definition corrected by Omar E. Pol, Mar 03 2015 STATUS approved

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

Last modified January 19 21:47 EST 2020. Contains 331066 sequences. (Running on oeis4.)