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
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
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)
a(n) = 3*A001316(n-1)/2 for n >= 2. - Georg Fischer, Jun 23 2021
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
Sequence in context: A351024 A110634 A324467 * A113397 A341343 A226602
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 05:26 EDT 2024. Contains 371918 sequences. (Running on oeis4.)