A213815 Arithmetic mean of next a(n) successive nonnegative integers is prime.
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
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.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
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
Comments