cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A024889 #11 Jan 08 2023 17:31:42
%S A024889 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,
%T A024889 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,
%U A024889 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
%N 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.
%H A024889 G. C. Greubel, <a href="/A024889/b024889.txt">Table of n, a(n) for n = 2..5000</a>
%F A024889 a(n) = Sum_{j=2..floor(n/2)} A023531(k)*A023533(n-k+1).
%t A024889 A023533[n_]:= A023533[n]= If[Binomial[Floor[Surd[6*n-1,3]]+2,3]!= n,0,1];
%t A024889 A023531[n_]:= If[IntegerQ[(Sqrt[8*n+9] -3)/2],1,0];
%t A024889 A024889[n_]:= A024889[n]= Sum[A023531[j]*A023533[n-j+1], {j, Floor[n/2]}];
%t A024889 Table[A024889[n], {n, 2, 130}] (* _G. C. Greubel_, Aug 02 2022 *)
%o A024889 (Magma)
%o A024889 A023533:= func< n | Binomial(Floor((6*n-1)^(1/3)) +2, 3) ne n select 0 else 1 >;
%o A024889 A023531:= func< n |  IsSquare(8*n+9) select 1 else 0 >;
%o A024889 A024889:= func< n | (&+[A023531(k)*A023533(n+1-k): k in [1..Floor(n/2)]]) >;
%o A024889 [A024889(n): n in [2..130]]; // _G. C. Greubel_, Aug 02 2022
%o A024889 (SageMath)
%o A024889 @CachedFunction
%o A024889 def A023533(n): return 0 if (binomial(floor((6*n-1)^(1/3)) +2, 3) != n) else 1
%o A024889 def A023531(n): return 1 if is_square(8*n+9) else 0
%o A024889 def A024889(n): return sum(A023531(k)*A023533(n-k+1) for k in (1..(n//2)))
%o A024889 [A024889(n) for n in (2..130)] # _G. C. Greubel_, Aug 02 2022
%Y A024889 Cf. A023531, A023533.
%K A024889 nonn
%O A024889 2,172
%A A024889 _Clark Kimberling_