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.

A187026 Least m such that prime(n) divides (prime(m) + prime(m+1))/2.

Original entry on oeis.org

2, 3, 6, 8, 25, 9, 11, 21, 19, 69, 24, 29, 46, 23, 60, 115, 51, 111, 32, 82, 129, 185, 132, 71, 106, 155, 63, 116, 84, 203, 54, 77, 58, 145, 108, 87, 289, 93, 67, 443, 254, 460, 292, 76, 350, 300, 447, 86, 397, 124, 284, 808, 128, 335, 136
Offset: 1

Views

Author

Vladimir Shevelev, Mar 02 2011

Keywords

Examples

			a(1) = 2 because prime(1)=2 divides (prime(2)+prime(3))/2 = (3+5)/2 = 4.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local m, pn; pn:= ithprime(n);
          for m from n+1 while not irem((ithprime(m)+ithprime(m+1))/2, pn)=0
          do od; m
        end:
    seq(a(n), n=1..80);  # Alois P. Heinz, Mar 02 2011
  • Mathematica
    leastM[n_]:=Module[{m=1},While[!Divisible[(Prime[m]+Prime[m+1])/2,n],m++];m]; leastM/@Prime[Range[60]] (* Harvey P. Dale, Mar 04 2011 *)