cp's OEIS Frontend

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.

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

This page as a plain text file.
%I A379148 #7 Dec 16 2024 14:42:30
%S A379148 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 A379148 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 A379148 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 A379148 a(n) is the number of iterations of the function x --> 2*x + 1 such that x remains prime, starting from A005384(n).
%C A379148 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 A379148 a(A371980(n)) = 1.
%e A379148 n = 1: A005384(1) = 2 --> 5 --> 11 --> 23 --> 47 --> 95, 95 is not a prime, thus a(1) = 4.
%e A379148 n = 2: A005384(2) = 3 --> 7 --> 15, 15 is not a prime, thus a(2) = 1.
%t A379148 s[n_] := -2 + Length[NestWhileList[2*# + 1 &, n, PrimeQ[#] &]]; Select[Array[s, 5000], # > 0 &] (* _Amiram Eldar_, Dec 16 2024 *)
%Y A379148 Cf. A000040, A005384, A005385, A371980.
%K A379148 nonn
%O A379148 1,1
%A A379148 _Ctibor O. Zizka_, Dec 16 2024