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.

A122821 Number of ways n can be represented as the arithmetic mean of consecutive primes.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 1, 0, 2, 0, 1, 3, 1, 0, 3, 0, 2, 2, 1, 0, 1, 2, 2, 0, 0, 2, 0, 0, 2, 5, 2, 0, 0, 3, 0, 0, 2, 4, 2, 0, 1, 3, 2, 0, 1, 1, 2, 0, 2, 1, 5, 1, 4, 0, 2, 2, 0, 0, 1, 3, 1, 0, 0, 2, 0, 0, 1, 1, 4, 1, 2, 1, 1, 0, 0, 1, 1, 3, 2, 0, 2, 2, 1, 0, 0, 1, 5, 0, 3, 0, 1, 1, 1, 0, 2, 2, 2, 0, 1, 1, 3, 3, 1, 0, 4
Offset: 1

Views

Author

Ray Chandler, Sep 28 2006

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_]:=Block[{i=1,j,c=0,m},While[Prime[i]<=n, j=1; While[m=Sum[Prime[k],{k,i,i+j-1}]/j; If[m==n,c++ ]; m