login
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.
1
2, 3, 5, 7, 11, 13, 24, 30, 36, 46, 50, 60, 70, 74, 84, 94, 102, 108, 149, 161, 171, 187, 197, 209, 229, 243, 253, 271, 281, 289, 313, 323, 339, 363, 381, 391, 403, 421, 502, 530, 552, 568, 592, 618, 630, 650, 674, 696, 712, 746, 768, 794, 802, 830, 846, 872, 906, 922
OFFSET
1,1
LINKS
MATHEMATICA
A023533[n_]:= A023533[n]= If[Binomial[Floor[Surd[6*n-1, 3]] +2, 3] != n, 0, 1];
A024694[n_]:= A024694[n]= Sum[Prime[n-j+1]*A023533[j], {j, Floor[(n+1)/2]}];
Table[A024694[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 >;
A024694:= func< n | (&+[A023533(k)*NthPrime(n+1-k): k in [1..Floor((n+1)/2)]]) >;
[A024694(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 A024694(n): return sum(nth_prime(n-k+1)*A023533(k) for k in (1..((n+1)//2)))
[A024694(n) for n in (1..130)] # G. C. Greubel, Sep 07 2022
CROSSREFS
Sequence in context: A038970 A079149 A343973 * A024320 A265885 A294994
KEYWORD
nonn
STATUS
approved