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).

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Ctibor O. Zizka, Dec 16 2024

Keywords

Comments

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.

Examples

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

Crossrefs

Programs

  • Mathematica
    s[n_] := -2 + Length[NestWhileList[2*# + 1 &, n, PrimeQ[#] &]]; Select[Array[s, 5000], # > 0 &] (* Amiram Eldar, Dec 16 2024 *)

Formula

a(A371980(n)) = 1.