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.

A024694 a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n+1-k), where k = floor((n+1)/2), s = A023533, t = A000040.

This page as a plain text file.
%I A024694 #6 Sep 07 2022 18:12:21
%S A024694 2,3,5,7,11,13,24,30,36,46,50,60,70,74,84,94,102,108,149,161,171,187,
%T A024694 197,209,229,243,253,271,281,289,313,323,339,363,381,391,403,421,502,
%U A024694 530,552,568,592,618,630,650,674,696,712,746,768,794,802,830,846,872,906,922
%N A024694 a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n+1-k), where k = floor((n+1)/2), s = A023533, t = A000040.
%H A024694 G. C. Greubel, <a href="/A024694/b024694.txt">Table of n, a(n) for n = 1..5000</a>
%t A024694 A023533[n_]:= A023533[n]= If[Binomial[Floor[Surd[6*n-1, 3]] +2, 3] != n, 0, 1];
%t A024694 A024694[n_]:= A024694[n]= Sum[Prime[n-j+1]*A023533[j], {j, Floor[(n+1)/2]}];
%t A024694 Table[A024694[n], {n, 130}] (* _G. C. Greubel_, Sep 07 2022 *)
%o A024694 (Magma)
%o A024694 A023533:= func< n | Binomial(Floor((6*n-1)^(1/3)) +2, 3) ne n select 0 else 1 >;
%o A024694 A024694:= func< n | (&+[A023533(k)*NthPrime(n+1-k): k in [1..Floor((n+1)/2)]]) >;
%o A024694 [A024694(n): n in [1..130]]; // _G. C. Greubel_, Sep 07 2022
%o A024694 (SageMath)
%o A024694 @CachedFunction
%o A024694 def A023533(n): return 0 if (binomial( floor( (6*n-1)^(1/3) ) +2, 3) != n) else 1
%o A024694 def A024694(n): return sum(nth_prime(n-k+1)*A023533(k) for k in (1..((n+1)//2)))
%o A024694 [A024694(n) for n in (1..130)] # _G. C. Greubel_, Sep 07 2022
%Y A024694 Cf. A000040, A023533.
%K A024694 nonn
%O A024694 1,1
%A A024694 _Clark Kimberling_