

A229819


Even bisection gives sequence a itself, n>a(2*(4*n+k)1) gives kth differences of a for k=1..4 with a(n)=n for n<2.


9



0, 1, 1, 1, 1, 1, 1, 7, 1, 0, 1, 2, 1, 6, 7, 14, 1, 2, 0, 4, 1, 8, 2, 14, 1, 2, 6, 4, 7, 6, 14, 0, 1, 2, 2, 2, 0, 6, 4, 28, 1, 0, 8, 8, 2, 22, 14, 41, 1, 8, 2, 14, 6, 19, 4, 24, 7, 6, 6, 5, 14, 5, 0, 5, 1, 1, 2, 0, 2, 0, 2, 2, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,8


LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..10000


FORMULA

a(2*n) = a(n),
a(8*n+1) = a(n+1)  a(n),
a(8*n+3) = a(n+2)  2*a(n+1) + a(n),
a(8*n+5) = a(n+3)  3*a(n+2) + 3*a(n+1)  a(n).
a(8*n+7) = a(n+4)  4*a(n+3) + 6*a(n+2)  4*a(n+1) + a(n).


MAPLE

a:= proc(n) option remember; local m, q, r;
m:= (irem(n, 8, 'q')+1)/2;
`if`(n<2, n, `if`(irem(n, 2, 'r')=0, a(r),
add(a(q+mj)*(1)^j*binomial(m, j), j=0..m)))
end:
seq(a(n), n=0..100);


MATHEMATICA

a[n_] := a[n] = Module[{m, q, r, q2, r2}, {q, r} = QuotientRemainder[n, 8]; m = (r+1)/2; If[n<2, n, {q2, r2} = QuotientRemainder[n, 2]; If[r2 == 0, a[q2], Sum[a[q+mj]*(1)^j*Binomial[m, j], {j, 0, m}]]]]; Table[a[n], {n, 0, 100}] (* JeanFrançois Alcover, Mar 08 2017, translated from Maple *)


CROSSREFS

Cf. A005590, A229817, A229818, A229820, A229821, A229822, A229823, A229824, A229825.
Sequence in context: A298937 A223855 A289481 * A194655 A197037 A256778
Adjacent sequences: A229816 A229817 A229818 * A229820 A229821 A229822


KEYWORD

sign,eigen


AUTHOR

Alois P. Heinz, Sep 30 2013


STATUS

approved



