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”).

A132658
a(6n+k) = 3a(6n+k-1)-3a(6n+k-2)+2a(6n+k-3), k = 0, 1, 3, 4, 5; a(6n+2) = 3a(6n+1)-3a(6n). a(0) = a(1) = 0, a(2) = 1.
3
0, 0, 1, 3, 6, 11, 21, 42, 63, 105, 210, 441, 903, 1806, 2709, 4515, 9030, 18963, 38829, 77658, 116487, 194145, 388290, 815409, 1669647, 3339294, 5008941, 8348235, 16696470, 35062587, 71794821, 143589642, 215384463, 358974105, 717948210
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
Cf. A024495.
Sequence in context: A202012 A261392 A251655 * A293320 A024495 A360045
KEYWORD
nonn
AUTHOR
Paul Curtz, Nov 15 2007
EXTENSIONS
Edited by R. J. Mathar, Jul 07 2008
STATUS
approved