login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) is the number of iterations of the function x --> 2*x + 1 such that x remains prime, starting from A005384(n).
0

%I #7 Dec 16 2024 14:42:30

%S 4,1,3,2,1,1,2,1,1,5,1,1,1,4,1,1,1,1,1,1,3,1,1,1,1,3,1,1,1,1,1,2,1,1,

%T 1,1,1,1,2,2,1,1,1,3,1,3,1,2,2,1,2,1,1,1,1,2,2,2,2,1,1,1,1,1,1,1,1,1,

%U 1,1,1,2,1,1,1,3,1,1,2,1,1,1,1,1,1,1,1,1,1,2,2,3,1,1,1,1,1,2,1

%N a(n) is the number of iterations of the function x --> 2*x + 1 such that x remains prime, starting from A005384(n).

%C Cunningham chain of the first kind of length i is a sequence of prime numbers (p_1, ..., p_i) such that p_(r + 1) = 2*p_r + 1 for all 1 =< r < i. This sequence tells the length of the Cunningham chain of the first kind for primes from A005384.

%F a(A371980(n)) = 1.

%e n = 1: A005384(1) = 2 --> 5 --> 11 --> 23 --> 47 --> 95, 95 is not a prime, thus a(1) = 4.

%e n = 2: A005384(2) = 3 --> 7 --> 15, 15 is not a prime, thus a(2) = 1.

%t s[n_] := -2 + Length[NestWhileList[2*# + 1 &, n, PrimeQ[#] &]]; Select[Array[s, 5000], # > 0 &] (* _Amiram Eldar_, Dec 16 2024 *)

%Y Cf. A000040, A005384, A005385, A371980.

%K nonn,new

%O 1,1

%A _Ctibor O. Zizka_, Dec 16 2024