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

%I #72 Jan 05 2023 21:19:27

%S 1,3,7,10,18,25,30,36,52,67,80,94,103,113,125,136,168,199,228,258,283,

%T 309,337,364,381,399,419,438,462,485,506,528,592,655,716,778,835,893,

%U 953,1012,1061,1111,1163,1214,1270,1325,1378,1432,1465,1499,1535,1570

%N Partial sums of A066194.

%C 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.

%H Alois P. Heinz, <a href="/A342448/b342448.txt">Table of n, a(n) for n = 1..16384</a>

%F a(n) = A268836(n)/2 + n. - _Kevin Ryde_, Mar 12 2021

%F 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

%p b:= proc(n) option remember; `if`(n<2, n,

%p Bits[Xor](n, b(iquo(n, 2))))

%p end:

%p a:= proc(n) a(n):= 1+`if`(n<2, 0, a(n-1)+b(n-1)) end:

%p seq(a(n), n=1..60); # _Alois P. Heinz_, Mar 14 2021

%t a[1]=1;

%t a[n_/;EvenQ[n]]:= a[n] = 4a[n/2] - n/2;

%t a[n_/;OddQ[n]]:= a[n] = 2a[(n - 1)/2]+2a[(n + 1)/2]-(n-1)/2 - ThueMorse[n];

%t (* Second program: *)

%t b[n_] := If[n==0, 0, BitXor@@Table[Floor[n/2^m], {m, 0, Floor[Log[2, n]]}]];

%t A066194 = Table[b[n]+1, {n, 0, 60}];

%t A066194 // Accumulate (* _Jean-François Alcover_, Sep 10 2022 *)

%Y Cf. A066194, A268836, A007814, A000120, A010060, A000035.

%K nonn,look

%O 1,2

%A _John Erickson_, Mar 12 2021

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 September 15 11:45 EDT 2024. Contains 375938 sequences. (Running on oeis4.)