OFFSET
0,4
COMMENTS
The third differences are 0, 0, 1, 3, 6, -11, 21, 42, 63, 105, 210, -441, ..., equal to the original sequence if each 6th term is negated.
MAPLE
A132658 := proc(n)
option remember;
if n <=1 then
0;
elif n = 2 then
1;
elif modp(n, 6) = 2 then
3*procname(n-1)-3*procname(n-2);
else
3*procname(n-1)-3*procname(n-2)+2*procname(n-3) ;
end if;
end proc:
seq(A132658(n), n=0..80) ; # R. J. Mathar, Aug 07 2017
MATHEMATICA
a[n_] := a[n] = Which[n <= 1, 0, n == 2, 1, Mod[n, 6] == 2, 3a[n-1] - 3a[n-2], True, 3a[n-1] - 3a[n-2] + 2a[n-3]];
Table[a[n], {n, 0, 80}] (+ Jean-François Alcover, Oct 27 2023, after R. J. Mathar *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul Curtz, Nov 15 2007
EXTENSIONS
Edited by R. J. Mathar, Jul 07 2008
STATUS
approved