The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A034959 Divide even numbers into groups with prime(n) elements and add together. 5
2, 18, 70, 182, 484, 884, 1666, 2546, 4048, 6612, 8928, 13172, 17794, 22274, 28576, 37524, 48380, 57340, 71556, 85626, 98550, 118658, 138112, 163404, 196134, 224220, 249672, 281838, 310650, 347136, 420624, 467670, 525806, 571846, 655898 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
From Hieronymus Fischer, Sep 27 2012: (Start)
a(n) = 2*Sum_{k=(A007504(n-1)+1)..A007504(n)} (k-1), n > 1.
a(n) = (A007504(n) - A007504(n-1))*(A007504(n) + A007504(n-1) - 1), n > 1.
a(n) = 2*(A000217(A007504(n) - 1) - A000217(A007504(n-1) - 1)), n > 1.
If we define A007504(0):=0, then the formulas above are also true for n=1.
a(n) = 2*A034957(n).
a(n) = A034960(n) - A000040(n).
(End)
EXAMPLE
{0,2} #2 S=2;
{4,6,8} #3 S=18;
{10,12,14,16,18} #5 S=70;
{20,22,24,26,28,30,32} #7 S=182.
PROG
(Python)
from itertools import islice
from sympy import nextprime
def A034959_gen(): # generator of terms
a, p = 0, 2
while True:
yield p*((a<<1)+p-1)
a, p = a+p, nextprime(p)
A034959_list = list(islice(A034959_gen(), 20)) # Chai Wah Wu, Mar 22 2023
CROSSREFS
Sequence in context: A112365 A242200 A258929 * A316902 A316904 A196812
KEYWORD
nonn
AUTHOR
Patrick De Geest, Oct 15 1998
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 May 29 00:29 EDT 2024. Contains 372921 sequences. (Running on oeis4.)