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!)
A045717 For each prime p take the sum of nonprimes < p. 0
1, 1, 5, 11, 38, 50, 95, 113, 176, 306, 336, 506, 623, 665, 800, 1050, 1330, 1390, 1710, 1917, 1989, 2369, 2612, 3042, 3693, 3990, 4092, 4407, 4515, 4848, 6408, 6795, 7465, 7603, 8899, 9049, 9819, 10619, 11114, 11964, 12844, 13024, 14698, 14890, 15475 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Subsequence of A101203. - Michel Marcus, Sep 28 2013

LINKS

Table of n, a(n) for n=1..45.

EXAMPLE

For p=7 we get 1+4+6=11.

MATHEMATICA

nn=200; With[{np=Complement[Range[nn], Prime[Range[PrimePi[nn]]]]}, Table[ Total[Select[np, #<p&]], {p, Prime[Range[PrimePi[nn]]]}]] (* Harvey P. Dale, Jun 25 2013 *)

PROG

(PARI) a(n) = {my(p = prime(n)); sum (i=1, p-1, i*(! isprime(i))); } \\ Michel Marcus, Sep 28 2013

(PARI) a(n)=my(p=prime(n), s=1); forcomposite(k=4, p, s+=k); k \\ Charles R Greathouse IV, Sep 28 2013

CROSSREFS

Cf. A000040.

Sequence in context: A139515 A038708 A042719 * A197337 A302766 A212199

Adjacent sequences:  A045714 A045715 A045716 * A045718 A045719 A045720

KEYWORD

nonn,easy

AUTHOR

Felice Russo

EXTENSIONS

Corrected and extended by Erich Friedman.

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 19 17:07 EDT 2022. Contains 353847 sequences. (Running on oeis4.)