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!)
A094338 (Sum of composites among next n numbers)-(sum of primes among next n numbers). 1
0, -5, 5, 20, 17, 39, 129, 140, 127, 305, 431, 448, 603, 777, 1037, 1540, 1313, 1951, 2373, 2450, 2861, 3407, 3975, 4656, 5329, 6073, 6951, 7092, 7983, 8091, 11063, 11290, 14695, 12749, 14143, 14276, 18495, 20201, 20571, 25612, 21065, 28283 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
a(4) = (8+9+10)-(7) =20.
MATHEMATICA
scsp[n_]:=Module[{prs=Select[n, PrimeQ]}, Total[Complement[n, prs]]-Total[ prs]]; With[{nn=50}, scsp/@TakeList[Range[(nn(nn+1))/2], Range[nn]]]/. (1->0) (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 01 2019 *)
CROSSREFS
Cf. A094337.
Sequence in context: A151789 A339320 A302176 * A205882 A099921 A139470
KEYWORD
sign
AUTHOR
Amarnath Murthy, May 17 2004
EXTENSIONS
More terms from Sean A. Irvine, Oct 13 2009
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 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)