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

 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, 125, 125, 121, 121, 123 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS Vincenzo Librandi, Table of n, a(n) for n = 1..1000 FORMULA a(2n-1) = a(2n). a(n) = 2*a(ceiling(n/2)) -1 + 2*t(ceiling(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 MATHEMATICA t[0] = 0; t[1] = 1; t[n_?EvenQ] := t[n] = t[n/2]; t[n_?OddQ] := t[n] = 1 - t[(n-1)/2]; a[1] = 1; a[n_?EvenQ] := a[n] = a[n - 1]; a[n_] := a[n] = 2*a[Ceiling[n/2]] - 1 + 2*t[Ceiling[n/2] - 1]; Table[a[n], {n, 1, 71}] (* Jean-François Alcover, Aug 13 2013 *) 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 * A283996 A003817 A092474 Adjacent sequences:  A105667 A105668 A105669 * A105671 A105672 A105673 KEYWORD nonn AUTHOR Benoit Cloitre, May 03 2005 EXTENSIONS Typo in data corrected by Jean-François Alcover, Aug 13 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.

Last modified May 7 00:42 EDT 2021. Contains 343609 sequences. (Running on oeis4.)