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

A024889
a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n-k+1), where k = floor(n/2), s = A023531, t = A023533.
1
0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0
OFFSET
2,172
LINKS
FORMULA
a(n) = Sum_{j=2..floor(n/2)} A023531(k)*A023533(n-k+1).
MATHEMATICA
A023533[n_]:= A023533[n]= If[Binomial[Floor[Surd[6*n-1, 3]]+2, 3]!= n, 0, 1];
A023531[n_]:= If[IntegerQ[(Sqrt[8*n+9] -3)/2], 1, 0];
A024889[n_]:= A024889[n]= Sum[A023531[j]*A023533[n-j+1], {j, Floor[n/2]}];
Table[A024889[n], {n, 2, 130}] (* G. C. Greubel, Aug 02 2022 *)
PROG
(Magma)
A023533:= func< n | Binomial(Floor((6*n-1)^(1/3)) +2, 3) ne n select 0 else 1 >;
A023531:= func< n | IsSquare(8*n+9) select 1 else 0 >;
A024889:= func< n | (&+[A023531(k)*A023533(n+1-k): k in [1..Floor(n/2)]]) >;
[A024889(n): n in [2..130]]; // G. C. Greubel, Aug 02 2022
(SageMath)
@CachedFunction
def A023533(n): return 0 if (binomial(floor((6*n-1)^(1/3)) +2, 3) != n) else 1
def A023531(n): return 1 if is_square(8*n+9) else 0
def A024889(n): return sum(A023531(k)*A023533(n-k+1) for k in (1..(n//2)))
[A024889(n) for n in (2..130)] # G. C. Greubel, Aug 02 2022
CROSSREFS
Sequence in context: A025456 A288314 A285963 * A368701 A101349 A295308
KEYWORD
nonn
STATUS
approved