login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A024328 a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*prime(n-j+1). 3
0, 0, 3, 5, 7, 11, 13, 17, 30, 36, 46, 50, 60, 70, 74, 84, 117, 131, 139, 157, 171, 177, 193, 207, 221, 237, 294, 310, 330, 348, 360, 390, 408, 424, 448, 470, 486, 506, 611, 625, 653, 673, 699, 739, 761, 781, 803, 835, 863, 891, 925, 953, 1078, 1104, 1136, 1180, 1214, 1244, 1270 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*prime(n-j+1).
MATHEMATICA
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 *)
PROG
(PARI) A024328(n)=sum(j=1, (n+1)\2, A023531(j)*prime(n-j+1)) \\ M. F. Hasler, Apr 12 2018
(Magma)
b:= func< n, j | IsIntegral((Sqrt(8*j+9) -3)/2) select NthPrime(n-j+1) else 0 >;
A024328:= func< n | (&+[b(n, j): j in [1..Floor((n+1)/2)]]) >;
[A024328(n) : n in [1..120]]; // G. C. Greubel, Feb 17 2022
(Sage)
def b(n, j): return nth_prime(n-j+1) if ((sqrt(8*j+9) -3)/2).is_integer() else 0
@CachedFunction
def A024327(n): return sum( b(n, j) for j in (1..floor((n+1)/2)) )
[A024327(n) for n in (1..120)] # G. C. Greubel, Feb 17 2022
CROSSREFS
Cf. A023531 (characteristic function of {n(n+3)/2}).
Sequence in context: A355845 A025127 A024883 * A032529 A154866 A106284
KEYWORD
nonn
AUTHOR
EXTENSIONS
Name edited by M. F. Hasler, Apr 12 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 03:11 EDT 2024. Contains 371782 sequences. (Running on oeis4.)