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.

Showing 1-10 of 11 results. Next

A059762 Initial primes of Cunningham chains of first type with length exactly 3. Primes in A059453 that survive as primes just two "2p+1 iterations", forming chains of exactly 3 terms.

Original entry on oeis.org

41, 1031, 1451, 1481, 1511, 1811, 1889, 1901, 1931, 3449, 3491, 3821, 3911, 5081, 5441, 5849, 6101, 6131, 7151, 7349, 7901, 8969, 9221, 10691, 10709, 11171, 11471, 11801, 12101, 12821, 12959, 13229, 14009, 14249, 14321, 14669, 14741, 15161
Offset: 1

Views

Author

Labos Elemer, Feb 20 2001

Keywords

Comments

Primes p such that {(p-1)/2, p, 2p+1, 4p+3, 8p+7} = {composite, prime, prime, prime, composite}.

Examples

			41 is a term because 20 and 325 are composites, and 41, 83, and 167 are primes.
		

Crossrefs

Programs

  • Mathematica
    ipccQ[n_]:=Module[{c=(n-1)/2},PrimeQ[NestList[2#+1&,c,4]]=={False, True, True, True, False}]; Select[Prime[Range[2000]],ipccQ] (* Harvey P. Dale, Nov 10 2014 *)

Extensions

Definition corrected by Alexandre Wajnberg, Aug 31 2005
Offset corrected by Amiram Eldar, Jul 15 2024

A059761 Initial primes of Cunningham chains of first type with length exactly 2. Primes in A059453 that survive as primes only one "2p-1 iteration", forming chains of exactly 2 terms.

Original entry on oeis.org

3, 29, 53, 113, 131, 173, 191, 233, 239, 251, 281, 293, 419, 431, 443, 491, 593, 641, 653, 659, 683, 743, 761, 809, 911, 953, 1013, 1049, 1103, 1223, 1289, 1499, 1559, 1583, 1601, 1733, 1973, 2003, 2069, 2129, 2141, 2273, 2339, 2351, 2393, 2399, 2543
Offset: 1

Views

Author

Labos Elemer, Feb 20 2001

Keywords

Comments

Primes p such that {(p-1)/2, p, 2p+1, 4p+3} = {composite, prime, prime, composite}.

Examples

			53 is a term because 26 and 215 are composites, and 53 and 107 are primes.
		

Crossrefs

Programs

  • Mathematica
    ccftQ[p_]:=Boole[PrimeQ[{(p-1)/2,p,2 p+1,4 p+3}]]=={0,1,1,0}; Select[ Prime[ Range[400]],ccftQ] (* Harvey P. Dale, Jun 19 2021 *)

A059764 Initial (unsafe) primes of Cunningham chains of first type with length exactly 5. Primes in A059453 that survive as primes just four "2p+1 iterations", forming chains of exactly 5 terms.

Original entry on oeis.org

2, 53639, 53849, 61409, 66749, 143609, 167729, 186149, 206369, 268049, 296099, 340919, 422069, 446609, 539009, 594449, 607319, 658349, 671249, 725009, 775949, 812849, 819509, 926669, 1008209, 1092089, 1132949, 1271849
Offset: 1

Views

Author

Labos Elemer, Feb 20 2001

Keywords

Comments

Primes p such that {(p-1)/2, p, 2p+1, 4p+3, 8p+7, 16p+15, 32p+31} = {nonprime, prime, prime, prime, prime, prime, composite}.

Examples

			2 is here because (2-1)/2 = 1/2 and 32*2+31 = 95 are not primes, while 2, 5, 11, 23, and 47 give a first-kind Cunningham chain of 5 primes which cannot be continued.
53639 is here because through <2p+1>, 53639 -> 107279 -> 214559 -> 429119 -> 858239 and the chain ends here (with this operator).
		

Crossrefs

Programs

  • Mathematica
    l5Q[n_]:=Module[{a=PrimeQ[(n-1)/2],b=PrimeQ[ NestList[2#+1&,n,5]]}, Join[{a},b]=={False,True,True,True,True,True,False}]; Select[Range[ 1300000],l5Q] (* Harvey P. Dale, Oct 14 2012 *)

Extensions

Definition corrected by Alexandre Wajnberg, Aug 31 2005
Entry revised by N. J. A. Sloane, Apr 01 2006

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

A053176 Primes p such that 2p+1 is composite.

Original entry on oeis.org

7, 13, 17, 19, 31, 37, 43, 47, 59, 61, 67, 71, 73, 79, 97, 101, 103, 107, 109, 127, 137, 139, 149, 151, 157, 163, 167, 181, 193, 197, 199, 211, 223, 227, 229, 241, 257, 263, 269, 271, 277, 283, 307, 311, 313, 317, 331, 337, 347, 349, 353, 367, 373, 379, 383
Offset: 1

Views

Author

Enoch Haga, Feb 29 2000

Keywords

Comments

Primes not in A005384 = non-Sophie Germain primes.
Also, numbers n such that odd part of A005277(n) is prime. Proof by John Renze, Sep 30 2004
Sequence gives primes p such that B(2p) has denominator 6, where B(2n) are the Bernoulli numbers. - Benoit Cloitre, Feb 06 2002
Sequence gives all n such that the equation phi(x)=2n has no solution. - Benoit Cloitre, Apr 07 2002
A010051(a(n))*(1-A156660(a(n))) = 1; subsequence of A138887. - Reinhard Zumkeller, Feb 18 2009
Mersenne prime exponents > 3 must be in the union of this sequence and (A002144). - Roderick MacPhee, Jan 12 2017

Examples

			17 is a term because 2*17 + 1 = 35 is composite.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(12200) | not IsPrime(2*p+1)]; // Vincenzo Librandi, Jun 18 2015
  • Mathematica
    Select[Prime[Range[1000]], ! PrimeQ[2 # + 1] &] (* Vincenzo Librandi, Jun 18 2015 *)
  • PARI
    list(lim)=select(p->!isprime(2*p+1),primes(primepi(lim))) \\ Charles R Greathouse IV, Jul 25 2011
    

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Feb 20 2012

A059455 Safe primes which are also Sophie Germain primes.

Original entry on oeis.org

5, 11, 23, 83, 179, 359, 719, 1019, 1439, 2039, 2063, 2459, 2819, 2903, 2963, 3023, 3623, 3779, 3803, 3863, 4919, 5399, 5639, 6899, 6983, 7079, 7643, 7823, 10163, 10799, 10883, 11699, 12203, 12263, 12899, 14159, 14303, 14699, 15803, 17939
Offset: 1

Views

Author

Labos Elemer, Feb 02 2001

Keywords

Comments

Primes p such that both (p-1)/2 and 2*p+1 are prime.
Except for 5, all are congruent to 11 modulo 12.
Primes "inside" Cunningham chains of first kind.
Infinite under Dickson's conjecture. - Charles R Greathouse IV, Jul 18 2012
See A162019 for the subset of a(n) that are "reproduced" by the application of the transformations (a(n)-1)/2 and 2*a(n)+1 to the set a(n). - Richard R. Forberg, Mar 05 2015

Examples

			83 is a term because it is prime and 2*83+1 = 167 and (83-1)/2 = 41 are both primes.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(20000) |IsPrime((p-1) div 2) and IsPrime(2*p+1)]; // Vincenzo Librandi, Oct 31 2014
    
  • Mathematica
    lst={}; Do[p=Prime[n]; If[PrimeQ[(p-1)/2]&&PrimeQ[2*p+1], AppendTo[lst, p]], {n, 7!}]; lst (* Vladimir Joseph Stephan Orlovsky, Dec 02 2008 *)
    Select[Prime[Range[1000]], AllTrue[{(# - 1)/2, 2 # + 1}, PrimeQ] &] (* requires Mathematica 10+; Feras Awad, Dec 19 2018 *)
  • PARI
    forprime(p=2,1e5,if(isprime(p\2)&&isprime(2*p+1),print1(p", "))) \\ Charles R Greathouse IV, Jul 15 2011
    
  • Python
    from itertools import count, islice
    from sympy import isprime, prime
    def A059455_gen(): # generator of terms
        return filter(lambda p:isprime(p>>1) and isprime(p<<1|1),(prime(i) for i in count(1)))
    A059455_list = list(islice(A059455_gen(),10)) # Chai Wah Wu, Jul 12 2022

Formula

A156660(a(n))*A156659(a(n)) = 1; A156877 gives numbers of these numbers <= n. - Reinhard Zumkeller, Feb 18 2009

A059452 Safe primes (A005385) that are not Sophie Germain primes.

Original entry on oeis.org

7, 47, 59, 107, 167, 227, 263, 347, 383, 467, 479, 503, 563, 587, 839, 863, 887, 983, 1187, 1283, 1307, 1319, 1367, 1487, 1523, 1619, 1823, 1907, 2027, 2099, 2207, 2447, 2579, 2879, 2999, 3119, 3167, 3203, 3467, 3947, 4007, 4079, 4127, 4139, 4259, 4283
Offset: 1

Views

Author

Labos Elemer, Feb 02 2001

Keywords

Comments

Except for 7, these primes are congruent to 11 modulo 12.
Terminal primes in complete Cunningham chains of first kind, i.e., the chains cannot be continued from these primes.

Examples

			347 is a term because 173 is a prime but 695 is not.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[(p-1)/2],If[ !PrimeQ[2*p+1],AppendTo[lst,p]]],{n,6!}];lst (* Vladimir Joseph Stephan Orlovsky, Jun 24 2009 *)
  • PARI
    is(p) = p > 2 && isprime(p) && isprime((p-1)/2) && !isprime(2*p+1); \\ Amiram Eldar, Jul 15 2024
  • Python
    from itertools import count, islice
    from sympy import isprime, prime
    def A059452_gen(): # generator of terms
        return filter(lambda p:isprime(p>>1) and not isprime(p<<1|1),(prime(i) for i in count(1)))
    A059452_list = list(islice(A059452_gen(),10)) # Chai Wah Wu, Jul 12 2022
    

Formula

A156659(a(n))*(1-A156660(a(n))) = 1. - Reinhard Zumkeller, Feb 18 2009

Extensions

Broken link updated by R. J. Mathar, Apr 12 2010

A059763 Primes starting a Cunningham chain of the first kind of length 4.

Original entry on oeis.org

509, 1229, 1409, 2699, 3539, 6449, 10589, 11549, 11909, 12119, 17159, 19709, 19889, 22349, 26189, 27479, 30389, 43649, 55229, 57839, 60149, 71399, 74699, 75329, 82499, 87539, 98369, 101399, 104369, 112919, 122099, 139439, 148829, 166739
Offset: 1

Views

Author

Labos Elemer, Feb 20 2001

Keywords

Comments

Initial (unsafe) primes of Cunningham chains of first type with length exactly 4. Primes in A059453 that survive as primes just three "2p+1 iterations", forming chains of exactly 4 terms.
The definition indicates each chain is exactly 4 primes long (i.e., the chain cannot be a subchain of a longer one). That is why this sequence is different from A023272, which also gives primes included in longer chains ("starting" them or not).
Prime p such that {(p-1)/2, p, 2p+1, 4p+3, 8p+7, 16p+15} = {composite, prime, prime, prime, prime, composite}.

Examples

			1229 is a term because, through 2p+1, 1229 -> 2459 -> 4919 -> 9839 and the chain ends here since 2*9839 + 1 = 11*1789 is composite.
		

Crossrefs

Programs

  • Maple
    isA059763 := 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 3 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 100000 do p := ithprime(i) ; if isA059763(p) then printf("%d,",p) ; fi ; od: # R. J. Mathar, Jul 23 2008

Extensions

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

A059766 Initial (unsafe) primes of Cunningham chains of first type with length exactly 6.

Original entry on oeis.org

89, 63419, 127139, 405269, 810809, 1069199, 1178609, 1333889, 1598699, 1806089, 1958249, 2606069, 2848949, 3241289, 3339989, 3784199, 3962039, 4088879, 4444829, 4664249, 4894889, 4897709, 5132999, 5215499, 5238179, 6026309, 6059519, 6088529, 6490769, 6676259
Offset: 1

Views

Author

Labos Elemer, Feb 21 2001

Keywords

Comments

Special terms of A059453. Not identical to A023330 of which 1122659, 2164229, 2329469, ..., etc. are omitted since they have exact length 7 or larger.
Unsafe primes starting complete chains of length 6.

Examples

			89 is a term because (89-1)/2 = 44 and 64*89+63 = 5759 = 13*443 are composites, while 89, 179, 359, 719, 1439, and 2879 are primes.
1122659 is not a term because it initiates a chain of length 7.
4658939 is not a term because (4658939-1)/2 = 2329469 is prime. - _Sean A. Irvine_, Oct 09 2022
		

Crossrefs

Extensions

Entry revised by N. J. A. Sloane Apr 01 2006
a(12) onward corrected and extended by Sean A. Irvine, Oct 09 2022

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
Showing 1-10 of 11 results. Next