login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Trisection a(3n+k) gives k-th differences of a for k=0..2 with a(n)=0 for n<2 and a(2)=1.
8

%I #20 Jun 16 2018 18:51:54

%S 0,0,1,0,1,-2,1,-1,2,0,1,-4,1,-3,6,-2,3,-5,1,-2,5,-1,3,-5,2,-2,3,0,1,

%T -6,1,-5,10,-4,5,-9,1,-4,13,-3,9,-17,6,-8,13,-2,5,-13,3,-8,14,-5,6,-9,

%U 1,-3,10,-2,7,-13,5,-6,10,-1,4,-12,3,-8,15,-5,7,-11

%N Trisection a(3n+k) gives k-th differences of a for k=0..2 with a(n)=0 for n<2 and a(2)=1.

%H Alois P. Heinz, <a href="/A229653/b229653.txt">Table of n, a(n) for n = 0..19683</a>

%F a(3*n) = a(n),

%F a(3*n+1) = a(n+1) - a(n),

%F a(3*n+2) = a(n+2) - 2*a(n+1) + a(n).

%p a:= proc(n) option remember; local m, q;

%p m:= irem(n, 3, 'q'); `if`(n<3, `if`(n=2, 1, 0),

%p add(a(q+m-j)*(-1)^j*binomial(m, j), j=0..m))

%p end:

%p seq(a(n), n=0..100);

%t a[n_] := a[n] = Module[{m, q}, {q, m} = QuotientRemainder[n, 3]; If[n < 3, If[n == 2, 1, 0], Sum[a[q + m - j]*(-1)^j*Binomial[m, j], {j, 0, m}]]];

%t Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Jun 09 2018, translated from Maple *)

%Y Cf. A005590, A229654, A229655, A229656, A229657, A229658, A229659, A229660.

%K sign,eigen,look

%O 0,6

%A _Alois P. Heinz_, Sep 27 2013