login
A024693
a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n+1-k), where k = floor((n+1)/2), s = A023533, t = A014306.
2
0, 1, 1, 0, 1, 1, 1, 2, 2, 1, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 3, 3, 3, 3, 3, 2, 3, 3, 3, 3, 3, 2, 3, 3, 2, 3, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 3, 4, 3, 4, 4, 3, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 4, 5, 5, 4
OFFSET
1,8
LINKS
FORMULA
a(n) = Sum_{k=1..floor((n+1)/2)} A023533(k)*A014306(n+1-k).
a(n) = Sum_{k=1..floor((n+1)/2)} A023533(k)*(1 - A023533(n-k+1)). - G. C. Greubel, Jul 15 2022
MATHEMATICA
A023533[n_]:= If[Binomial[Floor[Surd[6*n-1, 3]] +2, 3] != n, 0, 1];
A024693[n_]:= A024693[n]= Sum[(1-A023533[n-k+2])*A023533[k], {k, Floor[(n+1)/2]}];
Table[A024693[n], {n, 0, 100}] (* G. C. Greubel, Jul 15 2022 *)
PROG
(Magma)
A023533:= func< n | Binomial(Floor((6*n-1)^(1/3)) +2, 3) ne n select 0 else 1 >;
[(&+[A023533(k)*(1-A023533(n+1-k)): k in [1..Floor((n+1)/2)]]): n in [1..100]]; // G. C. Greubel, Jul 15 2022
(SageMath)
def A023533(n):
if binomial( floor( (6*n-1)^(1/3) ) +2, 3) != n: return 0
else: return 1
[sum(A023533(k)*(1-A023533(n-k+1)) for k in (1..((n+1)//2))) for n in (1..100)] # G. C. Greubel, Jul 15 2022
CROSSREFS
Sequence in context: A158209 A234538 A119646 * A025126 A129706 A160384
KEYWORD
nonn
STATUS
approved