

A086450


a(0) = 1, a(2n+1) = a(n), a(2n) = a(n) + a(n1) +...+ a(nm) +... 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 SternBrocot sequence (A002487).
Conjecture: a(n) mod 2 repeats the 7pattern 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 7k1 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(n1)) end:
seq(a(n), n=0..100); # Alois P. Heinz, Sep 26 2013


MATHEMATICA

a[0] = 1; a[n_] := a[n] = If[EvenQ[n], Sum[a[n/2k], {k, 0, n/2}], a[(n1)/2]]; Table[a[n], {n, 0, 100}] (* JeanFranç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/2k)), a((n1)/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



