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.

A050237 a(n) = the smallest number m such that there are exactly n sets of consecutive primes, each of which has an arithmetic mean of m.

Original entry on oeis.org

1, 2, 5, 12, 38, 30, 173, 165, 12259, 8803, 36735, 67263, 5296771, 32975, 1147233
Offset: 0

Views

Author

Naohiro Nomoto, May 08 2003

Keywords

Comments

First appearance of n in A122821.

Examples

			a(4) = 38 because there are exactly four sets of consecutive primes which have means of 38: {31,37,41,43}, {29,...,47}, {23,...,53} and {2,...,83},
		

Crossrefs

Programs

  • PARI
    {a(n)= m=2; starting_index=1; k=starting_index; sum_of_primes=0; prime_count=0; sets=0; until( (prime(starting_index)>m) && (sets==n), if( (prime(starting_index)> m) || (sets>n), m++; sets=0; starting_index=1; k=starting_index); sum_of_primes=sum_of_primes+prime(k); prime_count++; mean=sum_of_primes/ prime_count; if(meanRick L. Shepherd, Jun 14 2004

Extensions

Edited by Don Reble, Jun 17 2003