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!)
 A175078 Number of iterations of {r mod (max prime p < r)} needed to reach 1 or 2 starting at r = n. 2
 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,10 COMMENTS a(123) = 3 (first occurrence of value 3), a(1357324) = 4 (first occurrence of value 4). I offer a prize of 100 liters of Pilsner Urquell to the discoverer of value of first occurrence of value 5. See A175071 (natural numbers m with result 1) and A175072 (natural numbers m with result 2). See A175077 = results 1 or 2 under iterations of {r mod (max prime p < r)} starting at r = n. Essentially the same as A121561. [R. J. Mathar, Jan 28 2010] LINKS Antti Karttunen, Table of n, a(n) for n = 1..16384 EXAMPLE a(123) = 3; iteration procedure for n = 123: 123 mod 113 = 10, 10 mod 7 = 3, 3 mod 2 = 1. MATHEMATICA Array[-1 + Length@ NestWhileList[Mod[#, NextPrime[#, -1]] &, #, Not[1 <= # <= 2] &, 1, 120] &, 105] (* Michael De Vlieger, Oct 30 2017 *) PROG (PARI) A175078(n) = if(n<=2, 0, 1+A175078(n%precprime(n-1))); \\ Antti Karttunen, Oct 30 2017 CROSSREFS Cf. A175077, A121559, A121561. Sequence in context: A096285 A328483 A321856 * A121561 A078772 A088018 Adjacent sequences:  A175075 A175076 A175077 * A175079 A175080 A175081 KEYWORD nonn AUTHOR Jaroslav Krizek, Jan 23 2010 EXTENSIONS Name shortened by Antti Karttunen, Oct 30 2017 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 September 25 06:32 EDT 2020. Contains 337335 sequences. (Running on oeis4.)