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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A105670 a(1)=1 then bracketing n by powers of 2 as f(t)=2^t for f(t)<n<=f(t+1), a(n)=f(t+1)-a(n-f(t)). 5
1, 1, 3, 3, 7, 7, 5, 5, 15, 15, 13, 13, 9, 9, 11, 11, 31, 31, 29, 29, 25, 25, 27, 27, 17, 17, 19, 19, 23, 23, 21, 21, 63, 63, 61, 61, 57, 57, 59, 59, 49, 49, 51, 51, 55, 55, 53, 53, 33, 33, 35, 35, 39, 39, 37, 37, 47, 47, 45, 45, 41, 41, 43, 43, 127, 127, 1, 25, 125, 121, 121, 123 (list; graph; refs; listen; history; internal format)
OFFSET

1,3

FORMULA

a(2n-1) = a(2n).

a(n) = 2*a(ceil(n/2)) -1 +2*t(ceil(n/2)-1) where t(n)=A010060(n) is the Thue-Morse sequence.

MAPLE

A062383 := proc(n)

        ceil(log(n)/log(2)) ;

        2^% ;

end proc:

A105670 := proc(n)

        option remember;

        if n = 1 then

                1;

        else

                fn1 := A062383(n) ;

                fn := fn1/2 ;

                fn1-procname(n-fn) ;

        end if;

end proc:

seq(A105670(n), n=1..80) ; # R. J. Mathar, Nov 06 2011

PROG

(PARI) b(n, m)=if(n<2, 1, m*m^floor(log(n-1)/log(m))-b(n-m^floor(log(n-1)/log(m)), m))

CROSSREFS

Cf. A105669, A105672, A093347, A093348.

Sequence in context: A201932 A161771 A160515 * A003817 A092474 A107470

Adjacent sequences:  A105667 A105668 A105669 * A105671 A105672 A105673

KEYWORD

nonn

AUTHOR

Benoit Cloitre (benoit7848c(AT)orange.fr), May 03 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 13 11:38 EST 2012. Contains 205467 sequences.