login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A181715 Length of the complete Cunningham chain of the second kind starting with prime(n). 6
3, 2, 1, 2, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 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, 2, 1, 1, 1, 3, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Number of iterations x -> 2x-1 needed to get a composite number, when starting with prime(n).

LINKS

T. D. Noe, Table of n, a(n) for n = 1..10000

G. Löh, Long chains of nearly doubled primes, Math. Comp., 53 (1989), 751-759.

Wikipedia, Cunningham chain

FORMULA

a(n) < prime(n) for n > 1; see Löh (1989), p. 751. - Jonathan Sondow, Oct 28 2015

max(a(n), A181697(n)) = A263879(n) for n > 2. - Jonathan Sondow, Oct 30 2015

a(n) = A285700(A000040(n)). - Antti Karttunen, Apr 26 2017

EXAMPLE

2 -> 3 -> 5 -> 9 = 3^2, so a(1) = 3 and a(2) = 2. - Jonathan Sondow, Oct 30 2015

MATHEMATICA

Table[p = Prime[n]; cnt = 1; While[p = 2*p - 1; PrimeQ[p], cnt++]; cnt, {n, 100}] (* T. D. Noe, Jul 12 2012 *)

Table[-1 + Length@ NestWhileList[2 # - 1 &, Prime@ n, PrimeQ@ # &], {n, 98}] (* Michael De Vlieger, Apr 26 2017 *)

PROG

(PARI) a(n)= n=prime(n); for(c=1, 1e9, is/*pseudo*/prime(n=2*n-1) || return(c))

CROSSREFS

Cf. A000040, A005382, A005602, A181697, A263879, A285700, A285706.

Cf. A137288 (positions of terms > 1).

Sequence in context: A137241 A306287 A016457 * A077089 A156352 A323756

Adjacent sequences:  A181712 A181713 A181714 * A181716 A181717 A181718

KEYWORD

nonn

AUTHOR

M. F. Hasler, Nov 17 2010

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 23 18:13 EDT 2019. Contains 321433 sequences. (Running on oeis4.)