login
The OEIS is supported by the many generous donors to the OEIS 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
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
Sequence in context: A327573 A306069 A270807 * A190857 A003543 A114513
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 18 22:56 EDT 2024. Contains 370952 sequences. (Running on oeis4.)