Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #19 Feb 19 2022 10:20:14
%S 0,0,3,5,7,11,13,17,30,36,46,50,60,70,74,84,117,131,139,157,171,177,
%T 193,207,221,237,294,310,330,348,360,390,408,424,448,470,486,506,611,
%U 625,653,673,699,739,761,781,803,835,863,891,925,953,1078,1104,1136,1180,1214,1244,1270
%N a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*prime(n-j+1).
%H G. C. Greubel, <a href="/A024328/b024328.txt">Table of n, a(n) for n = 1..5000</a>
%F a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*prime(n-j+1).
%t Table[t=0; m=3; p=BitShiftRight[n]; n--; While[n>p, t += Prime[n]; n -= m++]; t, {n, 120}] (* _G. C. Greubel_, Feb 17 2022 *)
%o (PARI) A024328(n)=sum(j=1, (n+1)\2, A023531(j)*prime(n-j+1)) \\ _M. F. Hasler_, Apr 12 2018
%o (Magma)
%o b:= func< n, j | IsIntegral((Sqrt(8*j+9) -3)/2) select NthPrime(n-j+1) else 0 >;
%o A024328:= func< n | (&+[b(n, j): j in [1..Floor((n+1)/2)]]) >;
%o [A024328(n) : n in [1..120]]; // _G. C. Greubel_, Feb 17 2022
%o (Sage)
%o def b(n, j): return nth_prime(n-j+1) if ((sqrt(8*j+9) -3)/2).is_integer() else 0
%o @CachedFunction
%o def A024327(n): return sum( b(n, j) for j in (1..floor((n+1)/2)) )
%o [A024327(n) for n in (1..120)] # _G. C. Greubel_, Feb 17 2022
%Y Cf. A024312, A024313, A024314, A024315, A024316, A024317, A024318, A024319, A024320, A024321, A024322, A024323, A024324, A024325, A024326, A024327.
%Y Cf. A023531 (characteristic function of {n(n+3)/2}).
%K nonn
%O 1,3
%A _Clark Kimberling_
%E Name edited by _M. F. Hasler_, Apr 12 2018