login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of iterations p -> ap+b needed to get a composite number, starting with p=prime(n) and the least even a>0 and odd b<a, b>0 such that a*prime(n)+b is prime.
1

%I #20 Nov 17 2019 15:50:21

%S 5,2,4,2,3,2,2,2,2,2,2,2,3,2,2,2,2,4,2,4,2,2,2,6,2,4,2,2,4,2,2,2,2,2,

%T 3,2,2,2,2,2,5,2,2,2,4,2,2,2,2,2,2,2,2,2,3,2,3,2,2,2,2,2,2,2,2,5,2,2,

%U 2,2,2,4,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,3,2,2,2,2,2,4,2,2,2,2,2,2,2,4,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2,4,2,3,2,2,3,2,2,2,2,3,2,2,2,2,2,2,2,4,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,2,2,2,3,3,4,3,2,2

%N Number of iterations p -> ap+b needed to get a composite number, starting with p=prime(n) and the least even a>0 and odd b<a, b>0 such that a*prime(n)+b is prime.

%C The length of the prime chain starting at prime(n), with the least parameters a (>0, even) and b (>0, <a and odd) such that this chain is at least of length 2.

%H D. Broadhurst, Warren D. Smith, et al., <a href="http://groups.yahoo.com/group/primenumbers/message/22043">Prime chains x -> Ax+B</a>. Yahoo group "primenumbers", Nov 2010.

%H David Broadhurst and others, <a href="/A181696/a181696.txt">Prime chains x-->Ax+B</a>, digest of 143 messages in primenumbers Yahoo group, Nov 12, 2010 - Jan 7, 2011.

%H David Broadhurst and others, <a href="/A181696/a181696_1.txt">Prime chains x-->Ax+B</a>, digest of 143 messages in primenumbers Yahoo group, Nov 12, 2010 - Jan 7, 2011. [Cached copy]

%o (PARI) chainlen(n)={ n=prime(n); forstep(a=2,1e9,2,forstep(b=1,a,2, ispseudoprime(a*n+b)|next; for(c=1,1e9, ispseudoprime(n=a*n+b) | return(c)))) }

%K nonn

%O 1,1

%A _M. F. Hasler_, Nov 16 2010