login
A024687
a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n+1-k), where k = floor((n+1)/2), s = A000201 (lower Wythoff sequence), t = A023533.
1
1, 0, 0, 1, 3, 4, 6, 0, 0, 1, 3, 4, 6, 8, 9, 11, 12, 14, 16, 1, 3, 4, 6, 8, 9, 11, 12, 14, 16, 17, 19, 21, 22, 24, 26, 30, 33, 36, 40, 9, 11, 12, 14, 16, 17, 19, 21, 22, 24, 25, 27, 29, 30, 32, 33, 36, 40, 42, 46, 50, 52, 56, 58, 62, 66, 68, 72, 76, 78, 24, 25, 27, 29, 30, 32, 33, 35, 37, 38, 40
OFFSET
1,5
LINKS
FORMULA
a(n) = Sum_{k=1..floor((n+1)/2)} A000201(k) * A023533(n-k+1).
MATHEMATICA
A023533[n_]:= A023533[n]= If[Binomial[Floor[Surd[6*n-1, 3]] +2, 3]!= n, 0, 1];
A024687[n_]:= A024687[n]= Sum[Floor[j*GoldenRatio]*A023533[n-j+1], {j, Floor[(n+ 1)/2]}];
Table[A024687[n], {n, 100}] (* G. C. Greubel, Aug 01 2022 *)
PROG
(Magma)
A023533:= func< n | Binomial(Floor((6*n-1)^(1/3)) +2, 3) ne n select 0 else 1 >;
[(&+[Floor(k*(1+Sqrt(5))/2)*A023533(n+1-k): k in [1..Floor((n+1)/2)]]): n in [1..100]]; // G. C. Greubel, Aug 01 2022
(SageMath)
@CachedFunction
def A023533(n): return 0 if (binomial(floor((6*n-1)^(1/3)) +2, 3)!= n) else 1
def A024687(n): return sum(floor(j*golden_ratio)*A023533(n-j+1) for j in (1..((n+1)//2)))
[A024687(n) for n in (1..100)] # G. C. Greubel, Aug 01 2022
CROSSREFS
Sequence in context: A004784 A338056 A321404 * A072631 A085196 A021293
KEYWORD
nonn
STATUS
approved