The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A157049 a(n) = the largest integer < p(n+1) that is coprime to (p(n+1)-p(n)), where p(n) is the n-th prime. 2
 2, 3, 5, 9, 11, 15, 17, 21, 25, 29, 35, 39, 41, 45, 49, 55, 59, 65, 69, 71, 77, 81, 85, 95, 99, 101, 105, 107, 111, 125, 129, 133, 137, 147, 149, 155, 161, 165, 169, 175, 179, 189, 191, 195, 197, 209, 221, 225, 227, 231, 235, 239, 249, 253, 259, 265, 269, 275, 279 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS A157048(n) - A157049(n) = 1,2,4,8,10,14,16,20,24,28,34,38,40,44,48,54,..., ; a strictly monotonically increasing sequence. - Robert G. Wilson v, Apr 08 2009 LINKS Jens Kruse Andersen, Table of n, a(n) for n = 1..10000 EXAMPLE The 11th prime is 31. The 12th prime is 37. 37-31 = 6. The largest integer < 37 that is coprime to 6 is 35, which is a(11). MATHEMATICA f[n_] := Block[{k, p = Prime@n, q = Prime[n + 1]}, k = q - 1; While[ GCD[q - p, k] > 1, k-- ]; k]; Array[f, 59] (* Robert G. Wilson v, Apr 08 2009 *) PROG (PARI) a(n) = d=prime(n+1)-prime(n); k=prime(n+1)-1; while(gcd(k, d)>1, k--); k \\ Jens Kruse Andersen, Jul 31 2014 CROSSREFS Cf. A157048, A001223. Sequence in context: A014109 A328642 A102940 * A195668 A324698 A059042 Adjacent sequences:  A157046 A157047 A157048 * A157050 A157051 A157052 KEYWORD nonn AUTHOR Leroy Quet, Feb 22 2009 EXTENSIONS More terms from Robert G. Wilson v, Apr 08 2009 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified April 22 07:26 EDT 2021. Contains 343163 sequences. (Running on oeis4.)