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!)
A157419 a(0)=1. a(n) = the smallest integer coprime to a(n-1) and greater than the n-th prime. 4
1, 3, 4, 7, 8, 13, 14, 19, 20, 27, 31, 32, 39, 43, 44, 49, 54, 61, 62, 69, 73, 74, 81, 85, 91, 99, 103, 104, 109, 110, 117, 128, 133, 138, 143, 150, 157, 158, 165, 169, 174, 181, 182, 193, 194, 199, 200, 213, 224, 229, 230, 237, 241, 242, 255, 259, 264, 271, 272, 279 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
EXAMPLE
a(8) = 20, and the 9th prime is 23. So for a(9) we want the smallest integer that is both coprime to 20 and is > 23. Checking: 24 is not coprime to 20. 25 is not coprime to 20. 26 is not coprime to 20. But 27 is coprime to 20, so a(9) = 27.
MATHEMATICA
Fold[Append[#1, Block[{k = Prime@ #2 + 1}, While[! CoprimeQ[k, #1[[-1]] ], k++]; k]] &, {1}, Range@ 59] (* Michael De Vlieger, Oct 30 2017 *)
CROSSREFS
Sequence in context: A338467 A284491 A284506 * A008368 A023054 A374962
KEYWORD
nonn
AUTHOR
Leroy Quet, Feb 28 2009
EXTENSIONS
Extended by Ray Chandler, Jun 19 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 August 16 14:01 EDT 2024. Contains 375174 sequences. (Running on oeis4.)