This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A086450 a(0) = 1, a(2n+1) = a(n), a(2n) = a(n) + a(n-1) +...+ a(n-m) +... where a(n<0) = 0. 4
 1, 1, 2, 1, 4, 2, 5, 1, 9, 4, 11, 2, 16, 5, 17, 1, 26, 9, 30, 4, 41, 11, 43, 2, 59, 16, 64, 5, 81, 17, 82, 1, 108, 26, 117, 9, 147, 30, 151, 4, 192, 41, 203, 11, 246, 43, 248, 2, 307, 59, 323, 16, 387, 64, 392, 5, 473, 81, 490, 17, 572, 82, 573, 1, 681, 108, 707 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS Sequence has itself and its partial sums as bisections. Setting m=1 gives Stern-Brocot sequence (A002487). Conjecture: a(n) mod 2 repeats the 7-pattern 1,1,0,1,0,0,1 (A011657). The conjecture is easily proved by induction: a(0) to a(14)=1, 1, 2, 1, 4, 2, 5, 1, 9, 4, 11, 2, 16, 5 read mod 2 gives 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1. Assume the conjecture is true up to n = 14k. Then the 7 next odd entries a(14k+1), a(14k+3), ..., a(14k+13) are read from a(7k) to a(7k+6), which follow the correct mod 2 pattern by assuption. For the even entries a(14k), a(14k+10)... a(14k+12), the sum over the first 7k-1 addends is even, simply because of each consecutive 7 addends exactly 4 are odd. So again a(7k) to a(7k+6) determines the outcome and again gives the desired pattern. a(14k) is odd, since a(7k) is odd, a(14k+2) is even, since a(7k) and a(7k+1) are odd and so on ... - Lambert Herrgesell (zero815(AT)googlemail.com), May 08 2007 LINKS Alois P. Heinz, Table of n, a(n) for n = 0..10000 MAPLE a:= proc(n) local m; a(n):= `if`(n=0, 1,       `if`(irem(n, 2, 'm')=1, a(m), s(m)))     end: s:= proc(n) s(n):= a(n) +`if`(n=0, 0, s(n-1)) end: seq(a(n), n=0..100);  # Alois P. Heinz, Sep 26 2013 MATHEMATICA a = 1; a[n_] := a[n] = If[EvenQ[n], Sum[a[n/2-k], {k, 0, n/2}], a[(n-1)/2]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jun 16 2015 *) PROG (PARI) a(n)=if(n<2, n>=0, if(n%2==0, sum(k=0, n/2, a(n/2-k)), a((n-1)/2))) CROSSREFS Cf. A086449. Partial sums are in A085765. Sequence in context: A276133 A307602 A054269 * A270439 A106044 A124896 Adjacent sequences:  A086447 A086448 A086449 * A086451 A086452 A086453 KEYWORD nonn,easy AUTHOR Ralf Stephan, Jul 20 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.

Last modified September 20 10:10 EDT 2019. Contains 327229 sequences. (Running on oeis4.)