This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A379144 #26 Dec 16 2024 14:42:16 %S A379144 2,1,1,2,1,1,2,1,1,1,1,1,1,1,1,2,1,1,1,2,2,1,1,1,1,2,1,1,1,1,2,1,1,1, %T A379144 1,1,2,1,1,2,1,1,1,1,4,1,1,1,1,1,1,1,2,3,1,2,1,1,3,1,1,1,1,1,1,1,2,1, %U A379144 2,1,3,1,2,1,2,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,2,1,2,2,1,1,1,1 %N A379144 a(n) is the number of iterations of the function x --> 2*x - 1 such that x remains prime, starting from A005382(n). %C A379144 Cunningham chain of the second 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 second kind for primes from A005382. %F A379144 a(A110581(n)) = 1. %F A379144 a(A057326(n)) = 2. %e A379144 n = 1: A005382(1) = 2 --> 3 --> 5 --> 9, 9 is not a prime, thus a(1) = 2. %e A379144 n = 3: A005382(3) = 7 --> 13 --> 25, 25 is not a prime, thus a(3) = 1. %t A379144 s[n_] := -2 + Length[NestWhileList[2*# - 1 &, n, PrimeQ[#] &]]; Select[Array[s, 5000], # > 0 &] (* _Amiram Eldar_, Dec 16 2024 *) %Y A379144 Cf. A000040, A005382, A005383, A057326, A064812, A110581, A307390. %K A379144 nonn %O A379144 1,1 %A A379144 _Ctibor O. Zizka_, Dec 16 2024