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 16 results. Next

A059500 Primes p such that both q=(p-1)/2 and 2p + 1 = 4q + 3 are composite numbers. Intersection of A059456 and A053176.

Original entry on oeis.org

13, 17, 19, 31, 37, 43, 61, 67, 71, 73, 79, 97, 101, 103, 109, 127, 137, 139, 149, 151, 157, 163, 181, 193, 197, 199, 211, 223, 229, 241, 257, 269, 271, 277, 283, 307, 311, 313, 317, 331, 337, 349, 353, 367, 373, 379, 389, 397, 401, 409, 421, 433, 439, 449
Offset: 1

Views

Author

Labos Elemer, Feb 05 2001

Keywords

Comments

Primes which are neither safe nor of Sophie Germain type.
Primes not in Cunningham chains of the first kind. - Alonso del Arte, Jun 30 2005
A010051(a(n))*(1-A156660(a(n)))*(1-A156659(a(n))) = 1; A156878 gives numbers of these numbers <= n. - Reinhard Zumkeller, Feb 18 2009

Examples

			Prime p=17 is here because both 35 and 8 are composite numbers. Such primes fall "out of" any Cunningham chain of first kind (or generate Cunningham chains of 0-length).
		

Crossrefs

Programs

  • Mathematica
    Complement[Prime[Range[100]], Select[Prime[Range[100]], PrimeQ[2# + 1] &], Select[Prime[Range[100]], PrimeQ[(# - 1)/2] &]] (Delarte)
    Select[Prime[Range[100]],!PrimeQ[q=2#+1]&&!PrimeQ[(#-1)/2]&] (* Zak Seidov, Mar 09 2013 *)
  • PARI
    is(n)=isprime(n)&&!isprime(n\2)&&!isprime(2*n+1) \\ Charles R Greathouse IV, Jan 16 2013

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Jan 16 2013

A292936 a(n) = the least k >= 0 such that floor(n/(2^k)) is a nonprime; a(n) is degree of the "safeness" of prime, 0 if n is not a prime, 1 for unsafe primes (A059456), and k >= 2 for primes that are (k-1)-safe but not k-safe.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 27 2017

Keywords

Comments

Records occur at positions 1, 2, 5, 11, 23, 47, 2879, ... (A292937).

Crossrefs

Cf. A000040, A005385, A066179, A157358, A157359 (positions of terms that are > k, for k = 0..4).
Cf. A059456 (positions of ones).

Programs

  • Maple
    A292936 := proc(n)
        for k from 0 do
            if not isprime(floor(n/2^k)) then
                return k;
            end if;
        end do:
    end proc:
    seq(A292936(n),n=1..100) ; # R. J. Mathar, Sep 28 2017
  • Mathematica
    Table[SelectFirst[Range[0, 10], ! PrimeQ@ Floor[n/(2^#)] &], {n, 105}] (* Michael De Vlieger, Sep 29 2017 *)
  • PARI
    A292936(n) = { my(k=0); while(isprime(n), n >>= 1; k++); k; };
    
  • Scheme
    (define (A292936 n) (A007814 (1+ (A292599 n))))

Formula

a(n) = A007814(1+A292599(n)).
For n >= 1, a(n) <= A078349(n).
For n > 47, a(n) <= A007814(1+n).

A347332 Unsafe primes (primes in A059456) for which there is exactly one divisor d of p - 1 such that o(d) = L(p), where o(k) is the multiplicative order of k modulo p and L(p) is the least common multiple of o(k)'s among all divisors k of p - 1.

Original entry on oeis.org

2, 3, 31, 43, 112643
Offset: 1

Views

Author

Tomohiro Yamada, Aug 27 2021

Keywords

Comments

a(6) > 10^12, if it exists.
If a prime p = 2ab + 1 with a, b prime belongs to this sequence, then o(k) is a permutation over divisors of p - 1.
If a prime p = 2q + 1 is a safe prime (in A005385), then we have either o(2) = 2q, o(q) = q or o(2) = q, o(q) = 2q. Thus there is exactly one divisor d of p - 1 such that o(d) = L(p) = 2q.

Examples

			For p  = 31, then o(2) = 5, o(3) = 30, o(5) = 3, o(6) = 6, o(10) = 15, o(15) = 10, and o(30) = 2; so 31 is a term.
		

Crossrefs

Programs

  • PARI
    isunsafe(p) = isprime(p) && !isprime(p\2); \\ A059456
    isok(p) = {if (isunsafe(p), my(vd=divisors(p-1), L = lcm(vd)); sum(k=1, #vd, znorder(Mod(vd[k], p)) == L) == 1;);} \\ Michel Marcus, Aug 27 2021

A010051 Characteristic function of primes: 1 if n is prime, else 0.

Original entry on oeis.org

0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0
Offset: 1

Views

Author

Keywords

Comments

The following sequences all have the same parity (with an extra zero term at the start of a(n)): a(n), A061007, A035026, A069754, A071574. - Jeremy Gardiner, Aug 09 2002
Hardy and Wright prove that the real number 0.011010100010... is irrational. See Nasehpour link. - Michel Marcus, Jun 21 2018
The spectral components (excluding the zero frequency) of the Fourier transform of the partial sequences {a(j)} with j=1..n and n an even number, exhibit a remarkable symmetry with respect to the central frequency component at position 1 + n/4. See the Fourier spectrum of the first 2^20 terms in Links, Comments in A289777, and Conjectures in A001223 of Sep 01 2019. It also appears that the symmetry grows with n. - Andres Cicuttin, Aug 23 2020

References

  • J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 3.
  • V. Brun, Über das Goldbachsche Gesetz und die Anzahl der Primzahlpaare, Arch. Mat. Natur. B, 34, no. 8, 1915.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Oxford University Press, London, 1975.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 65.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 132.

Crossrefs

Cf. A051006 (constant 0.4146825... (base 10) = 0.01101010001010001010... (base 2)), A001221 (inverse Moebius transform), A143519, A156660, A156659, A156657, A059500, A053176, A059456, A072762.
First differences of A000720, so A000720 gives partial sums.
Column k=1 of A117278.
Characteristic function of A000040.
Cf. A008683.

Programs

  • Haskell
    import Data.List (unfoldr)
    a010051 :: Integer -> Int
    a010051 n = a010051_list !! (fromInteger n-1)
    a010051_list = unfoldr ch (1, a000040_list) where
       ch (i, ps'@(p:ps)) = Just (fromEnum (i == p),
                                  (i + 1, if i == p then ps else ps'))
    -- Reinhard Zumkeller, Apr 17 2012, Sep 15 2011
    
  • Magma
    s:=[]; for n in [1..100] do if IsPrime(n) then s:=Append(s,1); else s:=Append(s,0); end if; end for; s;
    
  • Magma
    [IsPrime(n) select 1 else 0: n in [1..100]];  // Bruno Berselli, Mar 02 2011
    
  • Maple
    A010051:= n -> if isprime(n) then 1 else 0 fi;
  • Mathematica
    Table[ If[ PrimeQ[n], 1, 0], {n, 105}] (* Robert G. Wilson v, Jan 15 2005 *)
    Table[Boole[PrimeQ[n]], {n, 105}] (* Alonso del Arte, Aug 09 2011 *)
    Table[PrimePi[n] - PrimePi[n-1], {n,50}] (* G. C. Greubel, Jan 05 2017 *)
  • PARI
    a(n)=isprime(n) \\ Charles R Greathouse IV, Apr 16 2011
    
  • Python
    from sympy import isprime
    def A010051(n): return int(isprime(n)) # Chai Wah Wu, Jan 20 2022

Formula

a(n) = floor(cos(Pi*((n-1)! + 1)/n)^2) for n >= 2. - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Nov 07 2002
Let M(n) be the n X n matrix m(i, j) = 0 if n divides ij + 1, m(i, j) = 1 otherwise; then for n > 0 a(n) = -det(M(n)). - Benoit Cloitre, Jan 17 2003
n >= 2, a(n) = floor(phi(n)/(n - 1)) = floor(A000010(n)/(n - 1)). - Benoit Cloitre, Apr 11 2003
a(n) = Sum_{d|gcd(n, A034386(n))} mu(d). [Brun]
a(m*n) = a(m)*0^(n - 1) + a(n)*0^(m - 1). - Reinhard Zumkeller, Nov 25 2004
a(n) = 1 if n has no divisors other than 1 and n, and 0 otherwise. - Jon Perry, Jul 02 2005
Dirichlet generating function: Sum_{n >= 1} a(n)/n^s = primezeta(s), where primezeta is the prime zeta function. - Franklin T. Adams-Watters, Sep 11 2005
a(n) = (n-1)!^2 mod n. - Franz Vrabec, Jun 24 2006
a(n) = A047886(n, 1). - Reinhard Zumkeller, Apr 15 2008
Equals A051731 (the inverse Möbius transform) * A143519. - Gary W. Adamson, Aug 22 2008
a(n) = A051731((n + 1)! + 1, n) from Wilson's theorem: n is prime if and only if (n + 1)! is congruent to -1 mod n. - N-E. Fahssi, Jan 20 2009, Jan 29 2009
a(n) = A166260/A001477. - Mats Granvik, Oct 10 2009
a(n) = 0^A070824, where 0^0=1. - Mats Granvik, Gary W. Adamson, Feb 21 2010
It appears that a(n) = (H(n)*H(n + 1)) mod n, where H(n) = n!*Sum_{k=1..n} 1/k = A000254(n). - Gary Detlefs, Sep 12 2010
Dirichlet generating function: log( Sum_{n >= 1} 1/(A112624(n)*n^s) ). - Mats Granvik, Apr 13 2011
a(n) = A100995(n) - sqrt(A100995(n)*A193056(n)). - Mats Granvik, Jul 15 2011
a(n) * (2 - n mod 4) = A151763(n). - Reinhard Zumkeller, Oct 06 2011
(n - 1)*a(n) = ( (2*n + 1)!! * Sum_{k=1..n}(1/(2*k + 1))) mod n, n > 2. - Gary Detlefs, Oct 07 2011
For n > 1, a(n) = floor(1/A001222(n)). - Enrique Pérez Herrero, Feb 23 2012
a(n) = mu(n) * Sum_{d|n} mu(d)*omega(d), where mu is A008683 and omega A001222 or A001221 indistinctly. - Enrique Pérez Herrero, Jun 06 2012
a(n) = A003418(n+1)/A003418(n) - A217863(n+1)/A217863(n) = A014963(n) - A072211(n). - Eric Desbiaux, Nov 25 2012
For n > 1, a(n) = floor(A014963(n)/n). - Eric Desbiaux, Jan 08 2013
a(n) = ((abs(n-2))! mod n) mod 2. - Timothy Hopper, May 25 2015
a(n) = abs(F(n)) - abs(F(n)-1/2) - abs(F(n)-1) + abs(f(n)-3/2), where F(n) = Sum_{m=2..n+1} (abs(1 - (n mod m)) - abs(1/2 - (n mod m)) + 1/2), n > 0. F(n) = 1 if n is prime, > 1 otherwise, except F(1) = 0. a(n) = 1 if F(n) = 1, 0 otherwise. - Timothy Hopper, Jun 16 2015
For n > 4, a(n) = (n-2)! mod n. - Thomas Ordowski, Jul 24 2016
From Ilya Gutkovskiy, Jul 24 2016: (Start)
G.f.: A(x) = Sum_{n>=1} x^A000040(n) = B(x)*(1 - x), where B(x) is the g.f. for A000720.
a(n) = floor(2/A000005(n)), for n>1. (End)
a(n) = pi(n) - pi(n-1) = A000720(n) - A000720(n-1), for n>=1. - G. C. Greubel, Jan 05 2017
Decimal expansion of Sum_{k>=1} (1/10)^prime(k) = 9 * Sum_{k>=1} pi(k)/10^(k+1), where pi(k) = A000720(k). - Amiram Eldar, Aug 11 2020
a(n) = 1 - ceiling((2/n) * Sum_{k=2..floor(sqrt(n))} floor(n/k)-floor((n-1)/k)), n>1. - Gary Detlefs, Sep 08 2023
a(n) = Sum_{d|n} mu(d)*omega(n/d), where mu = A008683 and omega = A001221. - Ridouane Oudra, Apr 12 2025
a(n) = 0 if (n^2 - 3*n + 2) * A000203(n) - 8 * A002127(n) > 0 else 1 (n>2, see Craig link). - Bill McEachen, Jul 04 2025

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

A156659 Characteristic function of safe primes.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 13 2009

Keywords

Crossrefs

Programs

  • Haskell
    a156659 n = fromEnum $ a010051 n == 1 && a010051 (n `div` 2) == 1
    -- Reinhard Zumkeller, Sep 18 2011
    
  • Mathematica
    Array[Boole[And[PrimeQ@ #, PrimeQ[(# - 1)/2]]] &, 105, 0] (* Michael De Vlieger, Dec 16 2017 *)
  • PARI
    a(n) = isprime(n) && isprime(floor((n-1)/2)) \\ Iain Fox, Dec 17 2017

Formula

a(n) = if n and also (n-1)/2 is prime then 1 else 0;
a(A005385(n)) = 1; a(A156657(n)) = 0; a(A059456(n)) = 0.
a(n) = A010051(n)*A010051((n-1)/2).
A156875(n) = Sum_{k=1..n} a(k). - Reinhard Zumkeller, Feb 18 2009
a(n) = 1 iff A292936(n) > 1. - Antti Karttunen, Dec 15 2017

A059453 Sophie Germain primes (A005384) that are not safe primes (A005385).

Original entry on oeis.org

2, 3, 29, 41, 53, 89, 113, 131, 173, 191, 233, 239, 251, 281, 293, 419, 431, 443, 491, 509, 593, 641, 653, 659, 683, 743, 761, 809, 911, 953, 1013, 1031, 1049, 1103, 1223, 1229, 1289, 1409, 1451, 1481, 1499, 1511, 1559, 1583, 1601, 1733, 1811, 1889, 1901
Offset: 1

Views

Author

Labos Elemer, Feb 02 2001

Keywords

Comments

Except for 2 and 3 these primes are congruent to 5 or 11 modulo 12.
Introducing terms of Cunningham chains of first kind.

Examples

			89 is a term because (89-1)/2 = 44 is not prime, but 2*89 + 1 = 179 is prime.
		

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 *)
    Select[Prime[Range[300]],PrimeQ[2#+1]&&!PrimeQ[(#-1)/2]&] (* Harvey P. Dale, Nov 10 2017 *)
  • PARI
    is(p) = isprime(p) && isprime(2*p+1) && if(p > 2, !isprime((p-1)/2), 1); \\ Amiram Eldar, Jul 15 2024
  • Python
    from itertools import count, islice
    from sympy import isprime, prime
    def A059453_gen(): # generator of terms
        return filter(lambda p:not isprime(p>>1) and isprime(p<<1|1),(prime(i) for i in count(1)))
    A059453_list = list(islice(A059453_gen(),10)) # Chai Wah Wu, Jul 12 2022
    

Formula

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

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 16 results. Next