The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A074330 a(n) = Sum_{k=1..n} 2^b(k) where b(k) denotes the number of 1's in the binary representation of k. 5
2, 4, 8, 10, 14, 18, 26, 28, 32, 36, 44, 48, 56, 64, 80, 82, 86, 90, 98, 102, 110, 118, 134, 138, 146, 154, 170, 178, 194, 210, 242, 244, 248, 252, 260, 264, 272, 280, 296, 300, 308, 316, 332, 340, 356, 372, 404, 408, 416, 424, 440, 448, 464, 480, 512, 520, 536 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, Identities and periodic oscillations of divide-and-conquer recurrences splitting at half, arXiv:2210.10968 [cs.DS], 2022, p. 29.
FORMULA
a(n+1)-a(n) = A001316(n)
From Ralf Stephan, Oct 07 2003: (Start)
a(0)=0, a(2n) = 2a(n-1) + a(n) + 2, a(2n+1) = 3a(n) + 2.
G.f.: (1/(1-x)) * Product_{k>=0} (1 + 2x^2^k). (End)
MAPLE
f:= proc(n) option remember; if n::even then 2*procname(n/2-1)+procname(n/2)+2
else 3*procname((n-1)/2)+2
fi
end proc:
f(0):= 0:
map(f, [$1..100]); # Robert Israel, Oct 08 2020
MATHEMATICA
b[n_] := IntegerDigits[n, 2] // Total;
a[n_] := 2^(b /@ Range[n]) // Total;
Array[a, 100] (* Jean-François Alcover, Aug 16 2022 *)
PROG
(PARI) a(n)=sum(i=1, n, 2^sum(k=1, length(binary(i)), component(binary(i), k)))
CROSSREFS
a(n) = A006046(n+1)-1. Cf. A080263.
Sequence in context: A300781 A050567 A069879 * A317626 A292550 A024895
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Oct 06 2002
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 May 27 13:23 EDT 2024. Contains 372861 sequences. (Running on oeis4.)