%I #15 Jan 09 2024 16:07:16
%S 0,0,1,0,0,1,0,0,1,1,0,0,1,0,1,0,1,1,0,0,1,1,0,1,0,0,1,2,0,0,1,0,1,0,
%T 1,1,0,0,2,1,0,0,1,0,1,1,0,2,0,0,0,1,1,1,1,0,1,1,0,0,1,1,1,0,0,1,1,0,
%U 2,1,0,0,2,0,0,0,0,3,0,1,1,0,0,1,1,0,1,1,0,1
%N a(n) = s(1)*s(n) + s(2)*s(n-1) + ... + s(k)*s(n+1-k), where k = floor((n+1)/2), s = A023531.
%H Reinhard Zumkeller, <a href="/A024316/b024316.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*A023531(n-j+1). - _G. C. Greubel_, Jan 17 2022
%t A023531[n_]:= SquaresR[1, 8n+9]/2;
%t a[n_]:= a[n]= Sum[A023531[j]*A023531[n-j+1], {j, Floor[(n+1)/2]}];
%t Table[a[n], {n, 110}] (* _G. C. Greubel_, Jan 17 2022 *)
%o (Haskell)
%o a024316 n = sum $ take (div (n + 1) 2) $ zipWith (*) zs $ reverse zs
%o where zs = take n $ tail a023531_list
%o -- _Reinhard Zumkeller_, Feb 14 2015
%o (Magma)
%o A023531:= func< n | IsIntegral( (Sqrt(8*n+9) - 3)/2 ) select 1 else 0 >;
%o [ (&+[A023531(j)*A023531(n-j+1): j in [1..Floor((n+1)/2)]]) : n in [1..110]]; // _G. C. Greubel_, Jan 17 2022
%o (Sage)
%o def A023531(n):
%o if ((sqrt(8*n+9) -3)/2).is_integer(): return 1
%o else: return 0
%o [sum( A023531(j)*A023531(n-j+1) for j in (1..floor((n+1)/2)) ) for n in (1..110)] # _G. C. Greubel_, Jan 17 2022
%Y Cf. A024312, A024313, A024314, A024315, A024317, A024318, A024319, A024320, A024321, A024322, A024323, A024324, A024325, A024326, A024327.
%Y Cf. A023531.
%K nonn
%O 1,28
%A _Clark Kimberling_