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.

A059690 Number of distinct Cunningham chains of first kind whose initial prime (cf. A059453) <= 2^n.

This page as a plain text file.
%I A059690 #16 Apr 03 2023 10:36:09
%S A059690 1,2,2,2,3,5,7,13,20,31,52,83,142,242,412,742,1308,2294,4040,7327,
%T A059690 13253,24255,44306,81700,150401,277335,513705,954847,1780466,3325109,
%U A059690 6224282,11676337,21947583,41327438
%N A059690 Number of distinct Cunningham chains of first kind whose initial prime (cf. A059453) <= 2^n.
%H A059690 C. K. Caldwell, <a href="https://t5k.org/glossary/page.php/CunninghamChain">Cunningham Chains</a>
%H A059690 W. Roonguthai, <a href="http://ksc9.th.com/warut/cunningham.html">Yves Gallot's Proth.exe and Cunningham Chains</a>
%e A059690 a(11)-a(10) = 21 means that between 1024 and 2048 exactly 21 primes introduce Cunningham chains: {1031, 1049, 1103, 1223, 1229, 1289, 1409, 1451, 1481, 1499, 1511, 1559, 1583, 1601, 1733, 1811, 1889, 1901, 1931, 1973, 2003}.
%e A059690 Their lengths are 2, 3 or 4. Thus the complete chains spread over more than one binary size-zone: {1409, 2819, 5639, 11279}. The primes 1439 and 2879 also form a chain but 1439 is not at the beginning of that chain, 89 is.
%t A059690 c = 0; k = 1; Do[ While[k <= 2^n, If[ PrimeQ[k] && !PrimeQ[(k - 1)/2] && PrimeQ[2k + 1], c++ ]; k++ ]; Print[c], {n, 1, 29}]
%o A059690 (Python)
%o A059690 from itertools import count, islice
%o A059690 from sympy import isprime, primerange
%o A059690 def c(p): return not isprime((p-1)//2) and isprime(2*p+1)
%o A059690 def agen():
%o A059690     s = 1
%o A059690     for n in count(2):
%o A059690         yield s; s += sum(1 for p in primerange(2**(n-1)+1, 2**n) if c(p))
%o A059690 print(list(islice(agen(), 20))) # _Michael S. Branicky_, Oct 09 2022
%Y A059690 Cf. A023272, A023302, A023330, A005602, A007700, A053176, A059452-A059456, A059500, A057331, A059688, A007053, A036378, A029837, A007053.
%K A059690 nonn,more
%O A059690 1,2
%A A059690 _Labos Elemer_, Feb 06 2001
%E A059690 Edited and extended by _Robert G. Wilson v_, Nov 23 2002
%E A059690 Title and a(30)-a(31) corrected, and a(32) from _Sean A. Irvine_, Oct 02 2022
%E A059690 a(33)-a(34) from _Michael S. Branicky_, Oct 09 2022