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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A157048 a(n) = the smallest integer > p(n) that is coprime to (p(n+1)-p(n)), where p(n) is the n-th prime. 2
3, 5, 7, 9, 13, 15, 19, 21, 25, 31, 35, 39, 43, 45, 49, 55, 61, 65, 69, 73, 77, 81, 85, 91, 99, 103, 105, 109, 111, 115, 129, 133, 139, 141, 151, 155, 161, 165, 169, 175, 181, 183, 193, 195, 199, 203, 215, 225, 229, 231, 235, 241, 243, 253, 259, 265, 271, 275, 279 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

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 smallest integer > 31 that is coprime to 6 is 35, which is a(11).

MATHEMATICA

f[n_] := Block[{k, p = Prime@n, q = Prime[n + 1]}, k = p + 1; While[ GCD[q - p, k] > 1, k++ ]; k]; Array[f, 59] (* Robert G. Wilson v, Apr 08 2009 *)

sicp[n_]:=Module[{k=n[[1]]+1, d=n[[2]]-n[[1]]}, While[!CoprimeQ[k, d] , k++]; k]; sicp/@Partition[Prime[Range[60]], 2, 1] (* Harvey P. Dale, Dec 23 2018 *)

PROG

(PARI) a(n) = d=prime(n+1)-prime(n); k=prime(n)+1; while(gcd(k, d)>1, k++); k \\ Jens Kruse Andersen, Jul 31 2014

CROSSREFS

Cf.  A001223, A157049.

Sequence in context: A327573 A306069 A270807 * A190857 A003543 A114513

Adjacent sequences:  A157045 A157046 A157047 * A157049 A157050 A157051

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 3 00:26 EDT 2020. Contains 333194 sequences. (Running on oeis4.)