cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A101203 a(n) = sum of nonprimes <= n.

Original entry on oeis.org

0, 1, 1, 1, 5, 5, 11, 11, 19, 28, 38, 38, 50, 50, 64, 79, 95, 95, 113, 113, 133, 154, 176, 176, 200, 225, 251, 278, 306, 306, 336, 336, 368, 401, 435, 470, 506, 506, 544, 583, 623, 623, 665, 665, 709, 754, 800, 800, 848, 897, 947, 998, 1050, 1050, 1104, 1159, 1215
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 23 2005

Keywords

Crossrefs

Partial sums of A191558.

Programs

  • Haskell
    a101203 n = a101203_list !! (n-1)
    a101203_list = scanl (+) 0 $ zipWith (*) [1..] $ map (1 -) a010051_list
    -- Reinhard Zumkeller, Oct 10 2013
  • Mathematica
    Accumulate[Table[If[PrimeQ[n],0,n],{n,0,60}]] (* Harvey P. Dale, Oct 02 2020 *)
  • PARI
    my(s=0); for(k=0,100,if(!isprime(k),s+=k);print1(s", ")); \\ Cino Hilliard, Feb 04 2006
    

Formula

a(n) = A000217(n) - A034387(n) = A101256(n) + 1.