

A151787


a(1)=1; for n > 1, a(n)=3*2^{wt(n1)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(n1)1), n=2..100)]; # Robert Israel, Feb 27 2018


MATHEMATICA

a[n_] := If[n == 1, 1, 3*2^(Total[IntegerDigits[n1, 2]]1)];
Array[a, 100] (* JeanFrançois Alcover, Mar 27 2019 *)


PROG

(PARI) a(n) = if (n==1, 1, 3*2^(hammingweight(n1)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



