login
A024690
a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n+1-k), where k = floor((n+1)/2), s = A001950 (upper Wythoff sequence), t = A023533.
1
2, 0, 0, 2, 5, 7, 10, 0, 0, 2, 5, 7, 10, 13, 15, 18, 20, 23, 26, 2, 5, 7, 10, 13, 15, 18, 20, 23, 26, 28, 31, 34, 36, 39, 43, 49, 54, 59, 65, 15, 18, 20, 23, 26, 28, 31, 34, 36, 39, 41, 44, 47, 49, 52, 54, 59, 65, 69, 75, 81, 85, 91, 95, 101, 107, 111, 117, 123, 127, 39, 41, 44, 47, 49, 52
OFFSET
1,1
LINKS
MATHEMATICA
A023533[n_]:= A023533[n]= If[Binomial[Floor[Surd[6*n-1, 3]] +2, 3] != n, 0, 1];
A001950[n_]:= Floor[n*GoldenRatio^2];
A024690[n_]:= A024690[n]= Sum[A001950[j]*A023533[n-j+1], {j, Floor[(n+1)/2]}];
Table[A024690[n], {n, 130}] (* G. C. Greubel, Sep 07 2022 *)
PROG
(Magma)
A023533:= func< n | Binomial(Floor((6*n-1)^(1/3)) +2, 3) ne n select 0 else 1 >;
A001950:= func< n | Floor(n*(3+Sqrt(5))/2) >;
A024690:= func< n | (&+[A001950(k)*A023533(n+1-k): k in [1..Floor((n+1)/2)]]) >;
[A024690(n): n in [1..130]]; // G. C. Greubel, Sep 07 2022
(SageMath)
@CachedFunction
def A023533(n): return 0 if (binomial( floor( (6*n-1)^(1/3) ) +2, 3) != n) else 1
def A001950(n): return floor(n*golden_ratio^2)
def A024690(n): return sum(A001950(k)*A023533(n-k+1) for k in (1..((n+1)//2)))
[A024690(n) for n in (1..130)] # G. C. Greubel, Sep 07 2022
CROSSREFS
Sequence in context: A223142 A244522 A292945 * A200728 A066209 A284455
KEYWORD
nonn
STATUS
approved