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!)
A342448 Partial sums of A066194. 1
1, 3, 7, 10, 18, 25, 30, 36, 52, 67, 80, 94, 103, 113, 125, 136, 168, 199, 228, 258, 283, 309, 337, 364, 381, 399, 419, 438, 462, 485, 506, 528, 592, 655, 716, 778, 835, 893, 953, 1012, 1061, 1111, 1163, 1214, 1270, 1325, 1378, 1432, 1465, 1499, 1535, 1570 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
n^2/2 + n/2 <= a(n) <= (31/50)*n^2 + n/2. The lower and upper bounds are attained at n=2^k and n=5*2^k for k >= 0.
LINKS
FORMULA
a(n) = A268836(n)/2 + n. - Kevin Ryde, Mar 12 2021
a(1) = 1; a(n) = [n == 0 (mod 2)]*(4*a(n/2) - n/2) + [n == 1 (mod 2)]*(2*a((n - 1)/2)+2*a((n + 1)/2)-(n-1)/2 - A010060(n)) where [] is an Iverson bracket
MAPLE
b:= proc(n) option remember; `if`(n<2, n,
Bits[Xor](n, b(iquo(n, 2))))
end:
a:= proc(n) a(n):= 1+`if`(n<2, 0, a(n-1)+b(n-1)) end:
seq(a(n), n=1..60); # Alois P. Heinz, Mar 14 2021
MATHEMATICA
a[1]=1;
a[n_/; EvenQ[n]]:= a[n] = 4a[n/2] - n/2;
a[n_/; OddQ[n]]:= a[n] = 2a[(n - 1)/2]+2a[(n + 1)/2]-(n-1)/2 - ThueMorse[n];
(* Second program: *)
b[n_] := If[n==0, 0, BitXor@@Table[Floor[n/2^m], {m, 0, Floor[Log[2, n]]}]];
A066194 = Table[b[n]+1, {n, 0, 60}];
A066194 // Accumulate (* Jean-François Alcover, Sep 10 2022 *)
CROSSREFS
Sequence in context: A171071 A265724 A352781 * A365931 A024330 A069153
KEYWORD
nonn,look
AUTHOR
John Erickson, Mar 12 2021
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 6 23:32 EDT 2024. Contains 372298 sequences. (Running on oeis4.)