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.

A248369 Least positive integer m such that prime(m+n) - prime(m) divides m.

Original entry on oeis.org

1, 6, 54, 18, 26, 24, 80, 120, 180, 48, 70, 160, 92, 82, 220, 98, 228, 102, 378, 130, 348, 152, 158, 172, 202, 372, 204, 720, 206, 448, 218, 560, 236, 228, 222, 1480, 282, 1656, 636, 300, 312, 322, 764, 350, 356, 352, 362, 420, 434, 860
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 05 2014

Keywords

Comments

Conjecture: a(n) exists for any n > 0. Moreover, for n > 9 we have a(n) < n^2 except for n = 12, 19, 36, 38.
Note that for each n > 1 the term a(n) should be even and at least 2*n.

Examples

			a(7) = 80 since prime(80+7) - prime(80) = 449 - 409 = 40 divides 80.
		

Crossrefs

Programs

  • Mathematica
    Do[m=1;Label[aa];If[Mod[m,Prime[m+n]-Prime[m]]==0,Print[n," ",m];Goto[bb]];m=m+1;Goto[aa];Label[bb];Continue,{n,1,50}]
    lpi[n_]:=Module[{m=1},While[Mod[m,Prime[n+m]-Prime[m]]!=0,m++];m]; Array[ lpi,50] (* Harvey P. Dale, Jan 17 2022 *)
  • PARI
    a(n)=m=1;while(m%(prime(m+n)-prime(m)),m++);m
    vector(100,n,a(n)) \\ Derek Orr, Oct 05 2014