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.

A214280 Total number of primes which can be reached via Cunningham chains, starting with prime(n), not counting this starting prime.

This page as a plain text file.
%I A214280 #40 Feb 16 2025 08:33:18
%S A214280 7,6,3,1,2,0,0,2,1,1,1,1,2,0,0,1,0,0,0,0,0,2,1,5,1,0,0,0,0,1,0,1,0,1,
%T A214280 0,0,1,0,0,1,4,0,1,0,0,1,1,0,0,1,1,1,0,1,0,0,0,1,0,1,0,1,1,0,0,0,2,1,
%U A214280 0,0,0,3,1,0,1,0,0,0,0,0,1,0,1,0,2,1
%N A214280 Total number of primes which can be reached via Cunningham chains, starting with prime(n), not counting this starting prime.
%C A214280 Other definition: Count of the binary descendants of the n-th prime. Prime q is a binary descendant of prime p if  2*p-1 <= q <= 2*p+1.
%C A214280 a(n) is  the total count of direct binary descendants of the n-th prime plus their binary descendants, and so on.
%C A214280 q=(p-1)*2 + b*2 + 1, where b is either 0 or 1. Thus if p>2 then in base 2: q is p with a digit inserted before the least significant digit.
%C A214280 It is conjectured there are arbitrarily big terms (see the MathWorld link).
%C A214280 If p==2 (mod 3), then only 2p+1 (==2 (mod 3) again) may be prime; 2p-1 will be divisible by 3. For p==1 (mod 3), only 2p-1 (==1 (mod 3) again) can be prime. Therefore, there can be no alternance in the +1/-1 choice (except for starting primes 2 and 3) when looking at all possible descendants. This leads to the formula by T. D. Noe.  - _M. F. Hasler_, Jul 13 2012
%H A214280 Jens Kruse Andersen and Eric W. Weisstein, <a href="https://mathworld.wolfram.com/CunninghamChain.html">MathWorld: Cunningham Chain</a>
%F A214280 a(n) = max(A181697(n), A181715(n)) - 1 for n > 2. - _T. D. Noe_, Jul 12 2012
%e A214280 prime(3)=5 has one binary descendant 11, which has one b.d. 23, which has one b.d. 47. Because 47 has no binary descendants, a(3)=3.
%e A214280 prime(4)=7 has one binary descendant 13, which has no binary descendants, so a(4)=1.
%e A214280 As explained in the comment, for n>2 this equals the maximum length of either of the Cunningham chains, i.e., iterations of x->2x+1 resp. x->2x-1 before getting a composite. For prime(2)=3, the first map yields (3)->7->(15) and the second map yields (3)->5->(9), so there are 2 primes, but one has to add the a(4)+a(3)=3+1 descendants of these 2 primes, whence a(2)=2+4=6.
%e A214280 Starting with prime(1)=2, the "2x-1" map yields 3, to which one must add its a(2)=6 descendants. They already include the prime 5 = 2*2+1 and its descendants. Thus, a(1)=1+6=7.
%t A214280 des[n_] := {If[PrimeQ[2*n-1], s = AppendTo[s, 2*n-1]; des[2*n-1]]; If[PrimeQ[2*n+1], s = AppendTo[s, 2*n+1]; des[2*n+1]]}; Table[s = {}; des[Prime[n]]; Length[Union[s]], {n, 100}] (* _T. D. Noe_, Jul 11 2012 *)
%Y A214280 Cf. A000040.
%Y A214280 Cf. A005383 - primes of the form prime*2-1.
%Y A214280 Cf. A005385 - primes of the form prime*2+1.
%Y A214280 Cf. A214342 - count of the decimal descendants.
%Y A214280 Cf. A181697, A181715 (two kinds of Cunningham chains).
%K A214280 nonn,base,easy
%O A214280 1,1
%A A214280 _Alex Ratushnyak_, Jul 09 2012