|
|
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
|
|
|
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
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|