login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A224915 Sum of (n XOR k) for k = 0, 1, 2, ..., n, where XOR is the bitwise logical exclusive-or operator. 3
0, 1, 5, 6, 22, 23, 27, 28, 92, 93, 97, 98, 114, 115, 119, 120, 376, 377, 381, 382, 398, 399, 403, 404, 468, 469, 473, 474, 490, 491, 495, 496, 1520, 1521, 1525, 1526, 1542, 1543, 1547, 1548, 1612, 1613, 1617, 1618, 1634, 1635, 1639, 1640, 1896, 1897, 1901, 1902, 1918 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Table of n, a(n) for n=0..52.

FORMULA

a(n) = Sum_{k=1..n} 4^(v_2(k)), where v_2(k) is the exponent of highest power of 2 dividing k. - Ridouane Oudra, Jun 08 2019

EXAMPLE

a(2) = (0 xor 2) + (1 xor 2) = 2 + 3 = 5.

MAPLE

read("transforms"):

A051933 := proc(n, k)

    XORnos(n, k) ;

end proc:

A224915 := proc(n)

    add(A051933(n, k), k=0..n) ;

end proc: # R. J. Mathar, Apr 26 2013

PROG

(Python)

for n in range(99):

    s = 0

    for k in range(n):  s += n ^ k

    print s,

(PARI) a(n) = sum(k=0, n, bitxor(n, k)); \\ Michel Marcus, Jun 08 2019

CROSSREFS

Cf. A004125, A222423, row sums of A051933.

Sequence in context: A132796 A006492 A110344 * A135301 A294175 A192917

Adjacent sequences:  A224912 A224913 A224914 * A224916 A224917 A224918

KEYWORD

nonn,easy

AUTHOR

Alex Ratushnyak, Apr 19 2013

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 22 00:32 EST 2019. Contains 329383 sequences. (Running on oeis4.)