This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A285706 a(n) = number of iterations x -> A064216(x) needed to reach a nonprime number when starting from prime(n), a(1) = a(2) = 1. 3
 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, 2, 3, 1, 1, 1, 1, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,4 COMMENTS Length (or size for the closed cycles: [2] and [3]) of the complete "slipping Cunningham chain of the second kind" starting with prime(n). That is, at the end of every step, the next prime q = 2p-1 "slips" by one step towards smaller primes as A064989(q). After n = 1, 2 (primes 2 & 3) differs from A181715 for the first time at n=22, where a(22) = 2, while A181715(22) = 3, prime(22) = 79. LINKS Antti Karttunen, Table of n, a(n) for n = 1..10000 FORMULA a(n) = A285701(A000040(n)). EXAMPLE See examples in A285701. MATHEMATICA Table[If[n <= 2, 1, -1 + Length@ NestWhileList[Apply[Times, FactorInteger[2 # - 1] /. {p_, e_} /; p > 2 :> NextPrime[p, -1]^e] &, Prime@ n, PrimeQ@ # &]], {n, 120}] (* Michael De Vlieger, Apr 26 2017 *) PROG (PARI) A285706(n) = A285701(prime(n)); \\ The rest of code in A285701. (Scheme) (define (A285706 n) (A285701 (A000040 n))) CROSSREFS Cf. A000040, A064216, A064989, A181715, A246373, A285701. Cf. A137288 (gives the positions of terms > 1 after its two initial terms). Sequence in context: A138904 A196660 A135222 * A124094 A101950 A104562 Adjacent sequences:  A285703 A285704 A285705 * A285707 A285708 A285709 KEYWORD nonn AUTHOR Antti Karttunen, Apr 26 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 February 19 07:51 EST 2019. Contains 320309 sequences. (Running on oeis4.)