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.

A060424 Record-setting n's for the function q(n), the minimum prime q such that n(q+1)-1 is prime p (i.e., q(n) > q(j) for all 0 < j < n).

Original entry on oeis.org

1, 3, 7, 13, 31, 51, 101, 146, 311, 1332, 2213, 6089, 10382, 11333, 32003, 83633, 143822, 176192, 246314, 386237, 450644, 1198748, 2302457, 5513867, 9108629, 11814707, 16881479, 18786623, 24911213, 28836722, 34257764, 196457309
Offset: 1

Views

Author

Matthew Conroy, Apr 10 2001

Keywords

Examples

			a(3)=7, since q(7)=5 and q(j) < 5 for 0 < j < 7.
		

Crossrefs

Cf. A060324. See A062252 and A062256 for the corresponding values of q and p.

Programs

  • Mathematica
    q[n_] := Module[{p = 2}, While[! PrimeQ[n*(p+1)-1], p = NextPrime[p]]; p]; record = 0; a[0] = 0; a[n_] := a[n] = For[k = a[n-1]+1, True, k++, If[q[k] > record, record = q[k]; Print[k]; Return[k]]]; Table[a[n], {n, 1, 32}] (* Jean-François Alcover, Nov 18 2013 *)