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.

A213815 Arithmetic mean of next a(n) successive nonnegative integers is prime.

Original entry on oeis.org

5, 1, 3, 5, 7, 5, 7, 9, 3, 5, 7, 5, 11, 1, 11, 9, 7, 1, 3, 5, 7, 21, 3, 17, 11, 9, 3, 1, 19, 21, 3, 5, 7, 5, 19, 5, 7, 9, 3, 17, 11, 1, 7, 21, 11, 1, 11, 5, 7, 5, 3, 9, 7, 1, 15, 5, 19, 5, 7, 9, 3, 5, 19, 5, 11, 9, 15, 25, 7, 5, 7, 9, 11, 1, 11, 5, 7, 1, 3
Offset: 1

Views

Author

Alex Ratushnyak, Jul 18 2012

Keywords

Comments

Corresponding primes: A062044(n).

Examples

			(0+1+2+3+4)/5 = 2 is prime, so a(1)=5,
then 5/1 = 5 is prime, so a(2)=1,
then (6+7+8)/3 = 7 is prime, so a(3)=3.
		

Crossrefs

Programs

  • Maple
    R:= 5: count:= 1: r:= 4:
    for count from 2 to 100 do
        s:= nextprime(r);
        R:= R,2*(s-r)-1;
        r:= 2*s - r - 1;
    od:
    R; # Robert Israel, Feb 28 2025