login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A079954 Partial sums of A030301. 3
0, 1, 2, 2, 2, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Kevin Ryde, Table of n, a(n) for n = 1..8192

FORMULA

a(n) = (n - 1 - (2/3)*(4^e_4-1) - (-1)^e_2*(n - 1 - 2*(4^e_4-1)))/2 where e_4 = floor(log_4(n)) and e_2 = floor(log_2(n)) = floor(log_4(n^2)). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 22 2003

a(n) = n - A079947(n). Let k=A000523(n), then a(n) = A000975(k) if k even, or a(n) = n - A000975(k) if k odd. - Kevin Ryde, Jul 23 2019

PROG

(PARI) a(n) = my(k=logint(n, 2), p=(2<<k)\3); if(bittest(k, 0), n-p, p); /* Kevin Ryde, Jul 23 2019 */

(MAGMA) [&+[Floor(Log(k)/Log(2)) mod 2:k in [1..n]]:n in [1..75]]; // Marius A. Burtea, Oct 25 2019

CROSSREFS

Cf. A000523, A000975, A030301, A079947.

Sequence in context: A109368 A046774 A029105 * A114968 A079629 A029116

Adjacent sequences:  A079951 A079952 A079953 * A079955 A079956 A079957

KEYWORD

nonn

AUTHOR

N. J. A. Sloane, Feb 22 2003

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 January 23 01:48 EST 2020. Contains 331166 sequences. (Running on oeis4.)