OFFSET
0,4
LINKS
David A. Corneth, Table of n, a(n) for n = 0..2000
FORMULA
Empirical g.f.: (x-1)*(2*x^4+3*x^3+x^2-1) / ((2*x-1)*(2*x^3-1)). - Colin Barker, Dec 22 2012
From David A. Corneth, Sep 13 2025: (Start)
Conjecture: a(n) = 2*a(n-1) for n > 2 and 3 does not divide n-1.
a(3*k+1) = 2*a(3*k) - 2^(k-1), k >= 1, 3*k + 1 = n.
This conjecture holds for 1 <= n <= 2000.
If this conjecture is true then a(3*k + 1 + r) = ((2*4^k - 2)/3 + 1)*2^(k-1+r) where k >= 1 and r in {0, 1, 2}.
(End)
MAPLE
b:= proc(n, s) option remember; `if`(n=0, `if`(s=0, 1, 0),
b(n-1, s)+b(n-1, irem(s+n, 6)))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..35); # Alois P. Heinz, May 02 2025
MATHEMATICA
b[n_, s_] := b[n, s] = If[n == 0, If[s == 0, 1, 0], b[n-1, s] + b[n-1, Mod[s+n, 6]]];
a[n_] := b[n, 0];
Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Sep 04 2025, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 11 2002
STATUS
approved
