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.

Previous Showing 11-20 of 22 results. Next

A075712 Rearrangement of primes into Germain groups (or Cunningham chains).

Original entry on oeis.org

2, 5, 11, 23, 47, 3, 7, 13, 17, 19, 29, 59, 31, 37, 41, 83, 167, 43, 53, 107, 61, 67, 71, 73, 79, 89, 179, 359, 719, 1439, 2879, 97, 101, 103, 109, 113, 227, 127, 131, 263, 137, 139, 149, 151, 157, 163, 173, 347, 181, 191, 383, 193, 197, 199, 211, 223, 229, 233
Offset: 1

Views

Author

Zak Seidov, Oct 03 2002

Keywords

Comments

In each group, p(i+1) = 2*p(i)+1.
The groups are also known as Cunningham chains of the first kind.

Examples

			The groups are:
{2, 5, 11, 23, 47},
{3, 7},
{13},
{17},
{19},
{29, 59},
{31},
{37},
{41, 83, 167},
{43},
{53, 107},
{61},
{67},
{71},
{73},
{79},
{89, 179, 359, 719, 1439, 2879},
{97},
{101},
{103},
{109},
{113, 227},
{127},
{131, 263},
{137},
{139},
...
		

Crossrefs

See also A181697.
See A059456 for initial terms, A338945 for lengths.

Programs

  • Mathematica
    Block[{a = {2}, j = 1, k, p}, Do[k = j; If[PrimeQ@ a[[-1]], AppendTo[a, 2 a[[-1]] + 1], While[! FreeQ[a, Set[p, Prime[k]]], k++]; j++; Set[a, Append[a[[1 ;; -2]], p]]], 10^3]; a] (* Michael De Vlieger, Nov 17 2020 *)
  • PARI
    first(n) = my(res=List([2,5,11,23,47])); forprime(p=3, oo, if(!isprime((p-1)>>1), listput(res,p); c = 2*p+1; while(isprime(c), listput(res,c); c=2*c+1)); if(#res>n,return(res))); res \\ David A. Corneth, Nov 13 2021

Extensions

Edited by N. J. A. Sloane, Nov 13 2021
More terms from David A. Corneth, Nov 13 2021

A110024 Smallest primes starting a complete three iterations Cunningham chain of the second kind.

Original entry on oeis.org

2131, 2311, 6211, 7411, 10321, 18121, 22531, 23011, 24391, 29671, 31771, 35311, 41491, 46411, 54601, 56311, 60331, 61381, 67651, 78031, 85381, 96931, 99871, 109471, 126001, 134731, 156691, 162451, 165331, 170851, 185131, 205171, 224401
Offset: 1

Views

Author

Alexandre Wajnberg, Sep 03 2005

Keywords

Comments

The word "complete" indicates each chain is exactly 4 primes long (i.e., the chain cannot be a subchain of another one). Other sequences give also primes included in longer chains ("starting" them or not).
Terms computed by Gilles Sadowski.

Examples

			2311 is here because, through the operator <*2-1> of the chains of the second kind,
2311 -> 4621 -> 9241 -> 18481 and the chain ends here (with this operator).
		

Crossrefs

Extensions

Edited and extended by R. J. Mathar, May 08 2009

A110022 Primes starting a Cunningham chain of the second kind of length 5.

Original entry on oeis.org

1531, 6841, 15391, 44371, 57991, 83431, 105871, 145021, 150151, 199621, 209431, 212851, 231241, 242551, 291271, 319681, 346141, 377491, 381631, 451411, 481021, 506791, 507781, 512821, 537811, 588871, 680431, 727561, 749761, 782911, 787711
Offset: 1

Views

Author

Alexandre Wajnberg, Sep 03 2005

Keywords

Comments

The definition indicates that each chain is exactly 5 primes long (i.e. the chain cannot be a subchain of a longer one). That's why this sequence is different from A057328 which gives also primes included in longer chains (thus not "starting" them), as 16651, starting a seven primes chain, or 33301, second prime of the same seven primes chain.

Examples

			6841 is here because: 6841 through <2p-1> -> 13681-> 27361-> 54721-> 109441 and the chain ends here since 2*109441-1=13*113*149 is composite.
		

Crossrefs

Programs

  • Maple
    isA110022 := proc(p) local pitr,itr ; if isprime(p) then if isprime( (p+1)/2 ) then RETURN(false) ; else pitr := p ; for itr from 1 to 4 do pitr := 2*pitr-1 ; if not isprime(pitr) then RETURN(false) ; fi ; od: pitr := 2*pitr-1 ; if isprime(pitr) then RETURN(false) ; else RETURN(true) ; fi ; fi ; else RETURN(false) ; fi ; end: for i from 2 to 200000 do p := ithprime(i) ; if isA110022(p) then printf("%d,",p) ; fi ; od: # R. J. Mathar, Jul 23 2008

Extensions

Edited and extended by R. J. Mathar, Jul 23 2008

A110056 Least prime that ends a complete Cunningham chain (of the first kind) of length n.

Original entry on oeis.org

13, 7, 167, 4079, 47, 2879, 71850239, 2444789759, 21981381119, 13357981992959, 681004115066879, 1136001594224639, 16756459239477534719, 781558105952602767359
Offset: 1

Views

Author

Alexandre Wajnberg, Sep 04 2005

Keywords

Comments

"Complete" means that this chain is not part of a longer Cunningham chain of the first kind.
Next term is greater than 4*10^17.
A005602(13)-> 8181864863026139 -> ... -> a(13) = 16756459239477534719. [From Washington Bomfim, Oct 21 2009]

Examples

			41->83->167 is a Cunningham chain of the first kind. It is complete because neither (41-1)/2 nor 2*167+1 is prime. It is the first such chain of three primes, so a(3) = 167.
		

Crossrefs

Cf. A110059 for Cunningham chains of the second kind.
Cf. A005602 [From Washington Bomfim, Oct 21 2009]

Extensions

Edited and extended by David Wasserman, Aug 08 2006
a(13) and a(14) from Washington Bomfim, Oct 21 2009

A110025 Smallest primes starting a complete three iterations Cunningham chain of the first or second kind.

Original entry on oeis.org

509, 1229, 1409, 2131, 2311, 2699, 3539, 6211, 6449, 7411, 10321, 10589, 11549, 11909, 12119, 17159, 18121, 19709, 19889, 22349, 22531, 23011, 24391, 26189, 27479, 29671, 30389, 31771, 35311, 41491, 43649, 46411, 54601, 55229, 56311
Offset: 1

Views

Author

Alexandre Wajnberg, Sep 03 2005

Keywords

Comments

Terms computed by Gilles Sadowski.

Examples

			1409 is here because, through the operator <2p+1> for chains of the first kind, 1409 -> 2819 -> 5639 -> 11279 and the chain ends here.
2131 is here because, through the operator <2p-1> for chains of the second kind, 2131 -> 4261 -> 8521 -> 17041 and the chain ends here.
		

Crossrefs

Formula

Union of A059763 and A110024. [R. J. Mathar, May 08 2009]

Extensions

Edited by R. J. Mathar, May 08 2009

A110027 Smallest primes starting a complete four iterations Cunningham chain of the first or second kind.

Original entry on oeis.org

2, 1531, 6841, 15391, 44371, 53639, 53849, 57991, 61409, 66749, 83431, 105871, 143609, 145021, 150151, 167729, 186149, 199621, 206369, 209431, 212851, 231241, 242551, 268049, 291271, 296099, 319681, 340919, 346141, 377491, 381631, 422069
Offset: 1

Views

Author

Alexandre Wajnberg, Sep 03 2005

Keywords

Comments

The word "complete" indicates each chain is exactly 5 primes long (i.e., the chain cannot be a subchain of another one).
Terms computed by Gilles Sadowski.

Crossrefs

Formula

Union of A059764 and A110022 . [R. J. Mathar, May 08 2009]

Extensions

Edited and extended by R. J. Mathar, May 08 2009

A059688 Length of Cunningham chain containing prime(n) either as initial, internal or final term.

Original entry on oeis.org

5, 2, 5, 2, 5, 0, 0, 0, 5, 2, 0, 0, 3, 0, 5, 2, 2, 0, 0, 0, 0, 0, 3, 6, 0, 0, 0, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 3, 2, 6, 0, 2, 0, 0, 0, 0, 0, 2, 0, 2, 2, 0, 2, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 0, 0, 0, 2, 2, 0, 2, 0, 2, 4, 0, 0, 0, 0, 0, 2, 0, 0
Offset: 1

Views

Author

Labos Elemer, Feb 06 2001

Keywords

Comments

The length of a chain is measured by the total number of terms including the end points. a(n)=0 means that prime(n) is neither Sophie Germain nor a safe prime (i.e. it is in A059500).

Examples

			For all of {2,5,11,23,47}, i.e. at positions {j}={1,3,5,9,15} a(j)=5. Similarly for indices of all terms in {89,...,5759} a(i)=6. No chains are intelligible with length = 1 because the minimal chain enclose one Sophie Germain and also one safe prime. Dominant values are 0 and 2.
		

Crossrefs

Extensions

Offset and a(5) corrected by Sean A. Irvine, Oct 01 2022

A059767 Initial (unsafe) primes of Cunningham chains of first type with length exactly 7.

Original entry on oeis.org

1122659, 2164229, 2329469, 10257809, 10309889, 12314699, 14030309, 14145539, 23103659, 24176129, 28843649, 37088729, 42389519, 49160099, 50785439, 62800169, 68718059, 88174049, 95831189, 105388169, 121255889, 138140729, 155439419, 159938459, 173285999
Offset: 1

Views

Author

Labos Elemer, Feb 21 2001

Keywords

Comments

Special primes from A059453.
Primes p such that (2^k)*p+(2^k)-1 is also prime for k = 0, 1, 2, 3, 4, 5, 6 and is composite for k = -1 and k = 7.

Examples

			C7 prime chain is generated from prime a(10) = 24176129 with 2p+1 iterations: 24176129, 48352259, 96704519, 193409039, 386818079, 773636159, 1547272319, 3094544639.
		

References

  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers, p. 178 (Rev. ed. 1997).

Crossrefs

Programs

  • Mathematica
    Transpose[Select[{#, Length[NestWhileList[2#+1&, #, PrimeQ]]-1}&/@ Prime[Range[PrimePi[24177000]]], #[[2]]>6&]][[1]]
    Select[Prime[Range[10^6]], PrimeQ[a1=2*#+1]&&PrimeQ[a2=2*a1+1]&&PrimeQ[a3=2*a2+1]&&PrimeQ[a4=2*a3+1]&&PrimeQ[a5=2*a4+1]&&PrimeQ[a6=2*a5+1] &] (* Vladimir Joseph Stephan Orlovsky, May 01 2008 *)
  • PARI
    is(n)=n%30==29 && isprime(n) && isprime(2*n+1) && isprime(4*n+3) && isprime(8*n+7) && isprime(16*n+15) && isprime(32*n+31) && isprime(64*n+63) && !isprime(n\2) && !isprime(128*n+127) \\ Charles R Greathouse IV, Dec 01 2016

Extensions

Corrected and extended by Harvey P. Dale, Jul 10 2002
More terms from Vladimir Joseph Stephan Orlovsky, Jan 17 2009
Corrected by John Cerkan, Nov 30 2016

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

Original entry on oeis.org

1, 2, 2, 2, 3, 5, 7, 13, 20, 31, 52, 83, 142, 242, 412, 742, 1308, 2294, 4040, 7327, 13253, 24255, 44306, 81700, 150401, 277335, 513705, 954847, 1780466, 3325109, 6224282, 11676337, 21947583, 41327438
Offset: 1

Views

Author

Labos Elemer, Feb 06 2001

Keywords

Examples

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

Crossrefs

Programs

  • Mathematica
    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}]
  • Python
    from itertools import count, islice
    from sympy import isprime, primerange
    def c(p): return not isprime((p-1)//2) and isprime(2*p+1)
    def agen():
        s = 1
        for n in count(2):
            yield s; s += sum(1 for p in primerange(2**(n-1)+1, 2**n) if c(p))
    print(list(islice(agen(), 20))) # Michael S. Branicky, Oct 09 2022

Extensions

Edited and extended by Robert G. Wilson v, Nov 23 2002
Title and a(30)-a(31) corrected, and a(32) from Sean A. Irvine, Oct 02 2022
a(33)-a(34) from Michael S. Branicky, Oct 09 2022

A110089 Smallest prime beginning (through <*2+1> or/and <*2-1>) a complete Cunningham chain (of the first or the second kind) of length n.

Original entry on oeis.org

11, 3, 2, 509, 2, 89, 16651, 15514861, 85864769, 26089808579, 665043081119, 554688278429, 758083947856951, 95405042230542329, 69257563144280941
Offset: 1

Views

Author

Alexandre Wajnberg, Sep 04 2005

Keywords

Comments

The word "complete" indicates each chain is exactly n primes long for the operator in function (i.e. the chain cannot be a subchain of another one); and the first and/or last term may be involved in a chain of the other kind (i.e. the chain may be connected to another one). a(1)-a(8) computed by Gilles Sadowski.

Examples

			a(1)=11 because 2, 3, 5 and 7 are included in longer chains than one prime long; and 11 (although included in a <2p+1> chain) has no prime connection through <2p-1>.
a(2)=3 because 3 begins (through 2p+1>) the first complete two primes chain: 3-> 7 (even if 3 and 7 are also part of two others chains, but through <2p-1>).
a(3)=2 because (although 2 begins also a five primes chain through <2p+1>) it begins, through <2p-1>, the first complete three primes chain encountered: 2->3->5.
		

Crossrefs

Formula

a(n) = min(A005602(n), A005603(n)). - R. J. Mathar, Jul 23 2008

Extensions

a(8)-a(13) via A005602, A005603 from R. J. Mathar, Jul 23 2008
a(14)-a(15) via A005602, A005603 from Jason Yuen, Sep 03 2024
Previous Showing 11-20 of 22 results. Next