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).
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 26 2017
STATUS
approved