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.

Showing 1-3 of 3 results.

A060863 Positive numbers n which are the average of a run of consecutive primes.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 9, 11, 12, 13, 15, 17, 18, 19, 21, 22, 23, 26, 29, 30, 31, 34, 37, 38, 39, 41, 42, 43, 45, 46, 47, 49, 50, 51, 52, 53, 55, 56, 59, 60, 61, 64, 67, 68, 69, 70, 71, 72, 73, 76, 77, 78, 79, 81, 82, 83, 86, 87, 89, 91, 92, 93, 95, 96, 97, 99, 100, 101, 102, 103
Offset: 1

Views

Author

David W. Wilson, May 04 2001

Keywords

Comments

All primes and averages of twin primes are in the sequence.

Examples

			2, 9, 46 are in the sequence because 2 = (2)/1; 9 = (7+11)/2; 46 = (41+43+47+53)/4.
		

Crossrefs

Complement of A060864.

Formula

A122821(a(n)) > 0.

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
    				

A122807 Least positive k such that n is equal to arithmetic mean of k consecutive primes, or 0 if no such k exists.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 0, 2, 0, 1, 2, 1, 0, 2, 0, 1, 2, 1, 0, 2, 4, 1, 0, 0, 2, 0, 0, 1, 2, 1, 0, 0, 2, 0, 0, 1, 4, 2, 0, 1, 2, 1, 0, 2, 4, 1, 0, 11, 2, 8, 22, 1, 0, 4, 2, 0, 0, 1, 2, 1, 0, 0, 2, 0, 0, 1, 4, 2, 28, 1, 2, 1, 0, 0, 2, 6, 10, 1, 0, 2, 6, 1, 0, 0, 2, 4, 0, 1, 0, 12, 6, 2, 0, 21, 8, 1, 0, 2, 40, 1, 2
Offset: 1

Views

Author

Ray Chandler, Sep 25 2006

Keywords

Comments

Inspired by A122480.

Crossrefs

Cf. A060864 (indices of 0 terms), A000040 (indices of 1 terms), A024675 (indices of 2 terms).
Showing 1-3 of 3 results.